Support » Plugin: WooCommerce » Removed Sidebar in single product page

  • Resolved acejays98

    (@acejays98)


    Hi can anyone help me with my problem

    I used to manage to put sidebar in my frontshop page and also in the archive. the only problem is I dont want to show the sidebar in the single product page please see image

    https://ibb.co/k9qtfxB

    I look for codes and snippet for this and nothing works for me.. I used avada for the theme….

    please someone help me and I hope I am in the right board thank you.

    Ho ever this is the reply on the closed tread that Imade I am in the wrong section

    Oscprofessionals (@magentomaster)
    1 hour, 2 minutes ago
    use this snippet in function.php to remove side bar

    function remove_sidebar( $is_active_sidebar, $index ) {
    if( $index !== “sidebar-1” ) {
    return $is_active_sidebar;
    }
    
    if( ! is_product() ) {
    return $is_active_sidebar;
    }
    
    return false;
    }
    
    add_filter( ‘is_active_sidebar’, ‘remove_sidebar’, 10, 2 );

    there is a error please see

    Your PHP code changes were rolled back due to an error on line 740 of file wp-content/themes/Avada/functions.php. Please fix and try saving again.

    syntax error, unexpected ‘”’ (T_STRING)

    • This topic was modified 2 months, 2 weeks ago by  acejays98.

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

Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.