Skip Navigation

[Resolved] WooCommerce archive not working upon creating layout for Pages

This thread is resolved. Here is a description of the problem and solution.

Problem:

The issue here is that the user's shop page Layout was not displaying the correct layout for the shop.

Solution:

The problem was that even though the shop should've been assigned to a default archive layout. The actual page that woocommerce uses for the archive was assigned to a different layout.

What was needed to be done was to edit that page and set the layout used to none.

This support ticket is created 6 years, 8 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 11 replies, has 2 voices.

Last updated by PiotrO586 6 years, 8 months ago.

Assisted by: Shane.

Author
Posts
#728862

Hi,

I created WooCommerce shop archive, which was working, the url is:
hidden link

The show archive is similar in layout as other archives, e.g.: hidden link

After that I set up layout for Pages (Layouts being used as templates for post types), and I noticed that the shop archive doesn't work any longer. Instead, a page with one product is shown. When I turn off the layout for Pages, the shop archive displays nothing... The single product pages works fine, e.g. hidden link

#729911

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Piotr,

Thank you for contacting our support forum.

I suspect that is because of a compatibility issue with the latest version of Woocommerce and our woocommerce views plugin.

Could you try the previous version here and let me know if the issue still remains .
hidden link

Thanks,
Shane

#733631

Hi Shane,

I downgraded the WooCommerce to the 3.3.2 version locally via WP Rollback plugin. But the issue remains.

I can provide you with the Duplicator copy of my local site should you need it.

#735004

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Piotr,

Thanks yes please provide the duplicator package.

The private fields will be enabled for this.

Thanks,
Shane

#735551
#737917

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Piotr,

Thank you for the duplicator.

I've identified the issue. Its because of the Layouts for pages assigned to the offers page. What you need to do is to go to the backend and edit the offers page and set the layout for the page to none and then update the page.

Please let me know if this helps.
Thanks,
Shane

#742595

Hi Shane,

I turned off the Layout for pages on the WooCommerce archive page, and:
1. on my live website (where I haven't downgraded WooCommerce) it didn't help, nothing except the header is shown: hidden link (even the admin top bar is not visible)
2. on my local website (with WooCommerce downgraded) it didn't help either, and I get the following error after this change:
Fatal error: Uncaught ArgumentCountError: Too few arguments to function Toolset_Compatibility_Theme_generatepress::remove_title(), 1 passed in xxx\wp-includes\class-wp-hook.php on line 286 and exactly 2 expected in xxx\wp-content\plugins\layouts\vendor\toolset\toolset-theme-settings\compatibility-modules\themes\wpddl.layouts-generate-press-theme.class.php:105 Stack trace: #0 xxx\wp-includes\class-wp-hook.php(286): Toolset_Compatibility_Theme_generatepress->remove_title('Offer') #1 xxx\wp-includes\plugin.php(203): WP_Hook->apply_filters('Offer', Array) #2 xxx\wp-content\plugins\wp-views\embedded\inc\wpv-shortcodes.php(2557): apply_filters('the_title', 'Offer') #3 xxx\wp-includes\shortcodes.php(319): wpv_shortcode_wpv_post_title(Array, '', 'wpv-post-title') #4 [internal function]: do_shortcode_tag(Array) #5 xxx\wp-includes\shortcodes.php(197): preg_replace_callback( in xxx\wp-content\plugins\layouts\vendor\toolset\toolset-theme-settings\compatibility-modules\themes\wpddl.layouts-generate-press-theme.class.php on line 105

Then I enabled Title in the Disable Elements of the layout Theme Options and it fixed the issue... (although the actual WooCommerce archive title comes from a layout row; the disable/enable option for the Title in the layout Theme Options doesn't hide/show this archive title).

I also noticed that when I enable Content Title for some CTP or Pages, and then disable it again, the Content Title is still there, e.g.: hidden link, hidden link (these pages have Content Title disabled in the Theme Options and a layout row displaying post title). I only could restore desired behavior that by creating new layout.

#743622

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Piotr,

Could you update my user account to admin once more so that I can check this as it works fine on the duplicator package.

Thanks,
Shane

#743988

Sure Shane, done. Login details available in our earlier correspondence.

#745098

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Piotr,

I took a look at your shop page and it seems to be displaying fine
hidden link

Is there something i'm missing ?

Please let me know.

Thanks,
Shane

#745308

There's problem with displaying titles, as I mentioned earlier, the Theme Option > Disable Elements > Content Title doesn't seem to work for individual pages. E.g. take a look on the Layout for Pages layout > Disable Elements > Content Title and see, e.g. this page: hidden link

The page hidden link doesn't display the title too although the Disable Elements > Title is enabled, but I know that WooCommerce archive page title is some special case (so I use layout row to display the title there).

This probably would need separate ticket, but I continue it here as it resulted from my actions related to this topic.

#745434

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Piotr,

We can actually workaround this by adding the Title element to your Layouts.

Add a visual editor to your layout and then add this to it.

<h1 class='col-sm-12 page-title'>[wpv-post-title]</h1>

This should add the offers page title back. I'm not seeing this issue in the duplicator on my end as the title displays fine.

For the other post title you can hide it using this.

.entry-header{
display:none;
}

Please let me know if this helps.
Thanks,
Shane

#747914

Sure, I do it this way.
I just wanted to highlight some issues between Toolset and GeneratePress theme, which still remain.

Thank you!