In this post, we’ll look at adding a custom sidebar to a custom taxonomy archive page.
This post assumes you have added a custom post type to your theme which supports creating custom taxonomy archive pages.
A custom taxonomy archive page is like a category archive page for your custom post type.
Remove Full Width Layout Code From Archive Template
The first step is to open your taxonomy-portfolio-type.php file and remove this line of PHP code which forces a full width layout on custom taxonomy archive pages:
//* Force full width content layout add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );
If you don’t remove this code, you cannot display a sidebar on your archive.
Create Custom Sidebar
The 2nd step is to create a custom sidebar using the Genesis Simple Sidebars plugin.
In this example, i have created a sidebar using the i.d ctt-sidebar.
Here’s the line of code from the below snippet which needs to include the custom sidebar i.d which in this case is ctt-sidebar: