Add Custom Post Type Navigation Links in Genesis Themes

cpt-navigation-genesis

You can add post navigation links to custom post types in Genesis WordPress themes by using an existing function and just extending it. That function is genesis_prev_next_post_nav and is found in genesis/lib/structure/post.php The function just refers to posts in the code but you can extend that by adding your own custom post types to an array which then add the navigation…

Read More

Show Custom Post Types in Category Archive Page

By default WordPress custom post types do not appear in a category or tag archive page, to change this behaviour and display the custom post type you can add this filter/function to your themes functions.php file. function themeprefix_show_cpt_archives( $query ) { if( is_category() || is_tag() && empty( $query->query_vars[‘suppress_filters’] ) ) { $query->set( ‘post_type’, array( ‘post’, ‘nav_menu_item’, ‘custom-post-type-name’…

Read More

Add Custom Taxonomy Post Meta Terms to Custom Post Type in Genesis WordPress

custom-taxonomies

To add in the post meta of  custom taxonomy terms into custom post types in Genesis WordPress theme you need to create a function with a conditional that equals the custom post type then set the post meta using shortcode which includes the taxonomy terms, then apply a filter to the result to the genesis_post_meta function in your functions.php file. You can choose to…

Read More

Set a Sidebar to all posts of a Custom Post Type in Genesis

sidebar set custom post type

Simple Sidebars is a great plugin to use different sidebars on posts, pages, categories and tags in a Genesis theme. You can set a certain sidebar to appear on all posts of a specific custom post type (CPT). function themeprefix_remove_default_sidebar() { if ( get_post_type() == ‘listing’ ) { //set CPT here remove_action( ‘genesis_sidebar’, ‘ss_do_sidebar’ ); remove_action(…

Read More