• Hi,
    I’ll have to post this question here and at the Elementor Pro support, not sure where to start looking for a solution.

    I am using OceanWP free and Elementor Pro. I am building a custom product archive page with Elementor Pro Theme builder. In the OceanWP Customizer, layout for page, single product and product archive are set to right sidebar. When editing the custom product archive in Elementor Pro Theme builder I set the page layout setting to Standard. But the custom archive page is rendered as full width page. How can I make OceanWP theme understand that the page I am working on is a product archive page and display the sidebar?

    M

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello,

    Can you please share your site link so that I can check it? Also, try to add the below code to the functions.php file of the child theme and check it fixes the issue or not –

    function owp_wc_custom_layout($class) {
        if (is_shop() || is_product() || is_product_category() || is_product_tag() || is_product_taxonomy()) {
                $class = 'right-sidebar';
        }
        return $class;
    }
    add_filter( 'ocean_post_layout_class', 'owp_wc_custom_layout', 20 );

    See the doc here – https://docs.oceanwp.org/article/203-altering-layouts

    Thread Starter Argentum

    (@argentum)

    Hm, how would I use that code for an Elementor custom product archive where the product category is 55? Or 55 and 66 and 77?

    I can’t try this until later this evening, have to close the site from the public.

    Thanks for answering
    M

    Thread Starter Argentum

    (@argentum)

    function owp_wc_custom_layout($class) {
        if (is_shop() || is_product() || is_product_category() || is_product_tag() || is_product_taxonomy()) {
                $class = 'right-sidebar';
        }
        return $class;
    }
    add_filter( 'ocean_post_layout_class', 'owp_wc_custom_layout', 20 );


    This does not work as far as I can tell. The custom product archive still shows as full width. I can’t let is stay that way, since it is a live site, so I am changing back to default product archive page.

    Where you have added the code? It should work.

    Thread Starter Argentum

    (@argentum)

    The functions.php file. Perhaps I have done something wrong in the Elementor settings for that product category archive page. I will have to try again this evening after office hours.
    All the best
    Magnus

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Elementor Pro custom product archive page layout’ is closed to new replies.