• Resolved olegsegal

    (@olegsegal)


    Hello there,

    I’m using Genesis Framework with Child theme.

    I’ve created custom post type + custom taxonomies.

    In the custom taxonomy archive page edit screen there is no option to select custom sidebar.

    Should I create “taxonomy-name.php” page and hardcode sidebars there? If so, how do I do that?

    I want to use “sidebar-content-sidebar” layout.

    First sidebar called “Secondary Sidebar” (don’t know slug), and second called “Primary Sidebar”

    What code do I need to put into that “taxonomy-name.php” page to assign sidebar with name “1” to the “Secondary Sidebar” area and sidebar with name “2” to the “Primary Sidebar” area?

    Thank you very much in advance!

Viewing 4 replies - 1 through 4 (of 4 total)
  • I want to know this to! Can someone help?

    Hello @olegsegal and @melanie-van-oers

    Happy New Year.

    My apologies for the delay in this thread,

    I had a chat with the developer about this. You will need to create new taxonomy-my_taxonomy.php file, and paste inside the content from the archive.php file of your theme.

    Make sure that the new my_taxonomy.php file contains the get_sidebar(); function.

    Let me know if you have any further questions!

    Kind regards,
    Nastia

    Thread Starter olegsegal

    (@olegsegal)

    Privet Nastia,

    But how do I assign sidebar with name “1” to the “Secondary Sidebar” area and sidebar with name “2” to the “Primary Sidebar” area?

    Please give some examples of implementing get_sidebar(); function in this case

    Thank you!
    Oleg

    Hello @olegsegal,

    I had a feedback from a developer about this.

    You need to add a custom taxonomy listing_category in a theme’s archive template. In this example add this code
    <?php if ( is_active_sidebar( 'sidebar-1' ) ) { ?> <div class="widget-column footer-widget-1"> <?php dynamic_sidebar( 'sidebar-1' ); ?> </div> <?php } ?>
    to a custom taxonomy template taxonomy_listing_category.php. You can download an example of taxonomy_listing_category.php file from here. It’s basicly an archive template from Twenty Seventeen theme with the above code inside.

    Let me know if you have any further questions!

    Kind regards,
    Nastia

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Custom Sidebars on Custom Taxonomy Archive Page’ is closed to new replies.