• Resolved innuvo

    (@innuvo)


    I have added the shortcode that displays the brands nicely, and it is all working perfectly. However, when you click on a particular brand, there is no sidebar showing.

    I would like to specify a custom sidebar for shop pages (which I have done on all other shop pages) but I cannot seem to set a specific sidebar for the brand archive pages…Do you have any ideas?

    Theme is Divi by Elegant Themes (i’ve see the other support threads on this but they dont solve the problem I have)

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • I have the same problem. I am using WordPress 4.7.2 and Divi too.

    When I activate the Storefront theme, the sidebar displays normally throughout the site. But the sidebar becomes different. So I suppose that the Divi theme defines its own sidebar.

    It seems that I came up with a solution.

    The Divi theme adds a sidebar on the page that match the conditions in the function B. But this function does not account the taxonomy of brands. Therefore, you need to add one more condition.

    1) Open file themes/Divi/functions.php
    2) Find function et_divi_output_content_wrapper_end()
    3) Find condition ( is_shop() || is_product_category() || is_product_tag() )
    4) Add || is_tax( 'pwb-brand' ) before the closing bracket.

    So you get

    function custom_divi_output_content_wrapper_end() {
      echo '</div> <!-- #left-area -->';
    
      if (
        ( is_product() && 'et_full_width_page' !== get_post_meta( get_the_ID(), '_et_pb_page_layout', true ) )
        ||
        ( ( is_shop() || is_product_category() || is_product_tag() || is_tax( 'pwb-brand' ) ) && 'et_full_width_page' !== et_get_option( 'divi_shop_page_sidebar', 'et_right_sidebar' ) )
      ) {
        woocommerce_get_sidebar();
      }
    
      echo '
            </div> <!-- #content-area -->
          </div> <!-- .container -->
        </div> <!-- #main-content -->';
    }

    Please tell me if it helped you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Sidebar not appearing’ is closed to new replies.