Skip to content

Instantly share code, notes, and snippets.

@Codevz
Last active June 18, 2022 10:34
Show Gist options
  • Save Codevz/0b13f536a97d1085fdc05a957293f828 to your computer and use it in GitHub Desktop.
Save Codevz/0b13f536a97d1085fdc05a957293f828 to your computer and use it in GitHub Desktop.
XTRA WP Theme - Action hook for adding content before any single posts meta, https://xtratheme.com/
<?php
/**
* With this function you can add any content or php codes before posts meta in single post page.
*
* @var $post current post object
*/
function codevz_single_before_meta( $post ) {
if ( $post->ID === 22 ) {
echo 'This content will show up before post meta where post ID is 22';
}
}
add_action( 'codevz/single/before_meta', 'codevz_single_before_meta' );
@Codevz
Copy link
Author

Codevz commented Jan 16, 2022

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