Skip to content

Instantly share code, notes, and snippets.

@Pebblo
Created March 31, 2023 13:03
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 Pebblo/c93c73f3aa24cb21c26bcf48b649eb02 to your computer and use it in GitHub Desktop.
Save Pebblo/c93c73f3aa24cb21c26bcf48b649eb02 to your computer and use it in GitHub Desktop.
<?php //Do not include the opening PHP tag if you already have one
add_filter( 'the_content', 'tw_ee_filter_the_content', 1 );
function tw_ee_filter_the_content( $content ) {
// Check if we're inside the main loop in a single espresso_events post.
if ( is_singular('espresso_events') && is_main_query() ) {
return '<h3>Course Details</h3>' . $content;
}
return $content;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment