[Theme: X] Sidebars not being assigned to custom post type pages
-
Hi
I have created a custom post type called Directory, and I have created posts and categorized them. I have also created custom template pages that output the categorized posts, using code such as this:
<?php $args = array( 'post_type' => 'directory', 'category_name' => 'festival','posts_per_page' => 10 ); $loop = new WP_Query( $args ); while ( $loop->have_posts() ) : $loop->the_post();?>
the trouble I’m having is that I am unable to assign particular sidebars to these custom pages. I have created some test sidebars in Appearance/Sidebars, and I am able to assign them to other non-custom pages, but all I get with the custom pages is the default blog sidebar.
The custom pages have the usual :
<?php get_sidebar(); ?>
and I have tried putting the sidebar name int he brackets, but that doesn’t affect it.
The custom pages are in the theme root.
Any help much appreciated.
Al
- The topic ‘[Theme: X] Sidebars not being assigned to custom post type pages’ is closed to new replies.