• Resolved onsitewp

    (@onsitewp)


    I have the Divi theme.
    To get the sidebar to display on brands I inserted the code:

    function my_et_divi_output_content_wrapper_end() {
    echo ‘</div> <!– #left-area –>’;
    $queried_object = get_queried_object();
    if(is_a($queried_object,’WP_Term’) && $queried_object->taxonomy == ‘pwb-brand’){
    get_sidebar();
    }
    echo ‘
    </div> <!– #content-area –>
    </div> <!– .container –>
    </div> <!– #main-content –>’;

    }
    function my_et_woocommerce_custom_sidebar() {
    remove_action( ‘woocommerce_after_main_content’, ‘et_divi_output_content_wrapper_end’, 10 );
    add_action( ‘woocommerce_after_main_content’, ‘my_et_divi_output_content_wrapper_end’, 10 );
    }
    add_action( ‘after_setup_theme’, ‘my_et_woocommerce_custom_sidebar’, 50 );

    However, this turns off the sidebar on the single product pages.
    The sidebar displays on brands and category pages.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor titodevera

    (@titodevera)

    Hi onsitewp!

    You can try with something like this…

    
    if( is_a( $queried_object, "WP_Term" ) && $queried_object->taxonomy == "pwb-brand" || is_product() ){
    get_sidebar();
    }
    

    ??

    I have the same problem and want to have the Sidebar on the Brands page. Could you please let me know the code I need to add and where it gets inserted?

    Otherwise it’s a great Plugin

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘No Sidebar on Single Product’ is closed to new replies.