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

    Hello,

    I have created a custom post type ‘djs’ and I wanted to display a menu with custom taxonomies using the plugin http://www.studiograsshopper.ch/custom-taxonomies-menu-widget/

    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.

    Thanks.

    #130101
    #130102

    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.

    #130103

    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') ) {
    register_sidebar(array(
    '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_sidebar();

    ?>

    With:

    <?php

    //get the sidebar

    get_sidebar( 'roster' );

    ?>

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

    <div id="sidebar">

    <ul>
    <?php
    if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('roster-sidebar') ) :
    endif; ?>
    </ul>
    </div>

    Now I have reloaded http://gummet.com/djs 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.

    #130104

    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?

    #130105

    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.

    Regards,

    Devin

    #130106

    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.