Skip to content

Instantly share code, notes, and snippets.

@Codevz
Last active June 18, 2022 10:34
Show Gist options
  • Save Codevz/7474d97e835bbfd6acc72c62a4cddfbf to your computer and use it in GitHub Desktop.
Save Codevz/7474d97e835bbfd6acc72c62a4cddfbf to your computer and use it in GitHub Desktop.
XTRA WP Theme - Action hook for adding content after any post types archive pages, https://xtratheme.com/
<?php
/**
* With this function you can add any content or php codes after post type archive pages.
*
* @var $post_type will return current post type name
*/
function my_prefix_after_archive( $post_type ) {
if ( $post_type === 'portfolio' ) {
echo 'This content will show up before portfolio posts.';
}
}
add_action( 'codevz/archive/after', 'my_prefix_after_archive' );
@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