Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
  • #26351


    I have created a custom post type ‘djs’ and I wanted to display a menu with custom taxonomies using the plugin

    So that in the sidebar people could refine the result by genre and location. I am wondering if there is a way to do this or maybe an alternative.

    For example displaying the results on a page and then assigning the page a specific sidebar.



    I notice in the avia layout editor the blog post widget. You can choose from displaying blog posts from categories and entries from a custom taxonomy.

    Is there a way in which to instead display posts from a custom post type?

    This means I could build an index page for that specific post type and then therefore assign a specific sidebar or widget area for that page.


    Alright, I have been trying a new approach and I’ve gotten I little stuck. wondering if you have any advice.

    Here is what I have done so far:

    1) I registered a new sidebar using the following code at the bottom of functions.php:

    if ( function_exists('register_sidebar') ) {
    'name' => 'Roster Sidebar',
    'id' => 'roster-sidebar',
    'description' => 'Appears as the sidebar on the custom roster',
    'before_widget' => '<div style="height: 280px"></div><li id="%1$s" class="widget %2$s">',
    'after_widget' => '</li>',
    'before_title' => '<h2 class="widgettitle">',
    'after_title' => '</h2>',

    2) I then added widgets to the new sidebar.

    3) Next I created a file called file called archive-djs.php and copy the code from archive.php only replacing

    //get the sidebar
    $avia_config['currently_viewing'] = 'blog';




    //get the sidebar

    get_sidebar( 'roster' );


    4) Then I created a file called sidebar-roster.php and added:

    <div id="sidebar">

    if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('roster-sidebar') ) :
    endif; ?>

    Now I have reloaded and there is no a sidebar space but no sidebar???

    I know the problem is also fix there is just one magic bit of code missing. I can feel it in my bones.


    Also I just inspected the source code and I notice the custom sidebar has been registered to that page the widget are getting noticed but yet still nothing is popping up?


    Hi Torlock,

    This kind of customization is beyond the scope of what we can assist with via support. There are just too many variables that could be effecting what is happening to accurately debug or even offer a direction to go in.

    You could try posting on StackExchange or looking into a freelance developer to complete the customization for you.




    Hello Devin,

    Thanks for the reply. I suppose this is understandable. Thanks for the message anyway, I think I may have solved the problem.

Viewing 7 posts - 1 through 7 (of 7 total)

The topic ‘Is it possible to add widgets to custom post types archive sidebar?’ is closed to new replies.