Skip to content

Instantly share code, notes, and snippets.

@Codevz
Last active June 18, 2022 10:33
Show Gist options
  • Select an option

  • Save Codevz/bbe6f50b7cab0f4672e6d23aa3927c3d to your computer and use it in GitHub Desktop.

Select an option

Save Codevz/bbe6f50b7cab0f4672e6d23aa3927c3d to your computer and use it in GitHub Desktop.
XTRA WP Theme - Action hook for adding content after post title and date in single post pages, https://xtratheme.com/
<?php
/**
* With this function you can add any content or php codes after title and date section in single post page.
*
* @var $post current post object
*/
function my_prefix_after_title_date( $post ) {
if ( $post->ID === 46 ) {
echo 'This is a custom content text.';
}
}
add_action( 'codevz/single/after_title_date', 'my_prefix_after_title_date' );
@Codevz

Codevz commented Jan 18, 2022

Copy link
Copy Markdown
Author

If you want to see more actions and hooks of XTRA WP theme, Please check out documentation here https://xtratheme.com/docs/developer/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment