Skip to content

Instantly share code, notes, and snippets.

@quantumleap33
Last active February 15, 2024 17:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save quantumleap33/ef77205bddc55e74be7822c7cecd2e8e to your computer and use it in GitHub Desktop.
Save quantumleap33/ef77205bddc55e74be7822c7cecd2e8e to your computer and use it in GitHub Desktop.
generate_page_hero_output shortcode example 1
add_filter( 'generate_page_hero_output', function( $output, $options ) {
return sprintf(
'<div class="%1$s">
<div class="%2$s">
%3$s
</div>
<div>
<?php echo do_shortcode("[searchform post_types="tutorial"]"); ?>
</div>
</div>',
trim( $options['container_classes'] ),
trim( $options['inner_container_classes'] ),
$options['content']
);
}, 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment