Skip Navigation

[Resolved] Post of Custom Post type show up in product archive

This support ticket is created 2 years, 11 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)

Tagged: 

This topic contains 9 replies, has 2 voices.

Last updated by maximilianD 2 years, 11 months ago.

Assisted by: Shane.

Author
Posts
#2040619

After the latest update, I noticed that posts of the custom post type "Serie" show up with my product archive.
Sample can be found here: /serien-varianten/100-de
The last link in the list is not a product, but a post of the post type serie
As mentioned before, this behaviour only occured after the latest update.

I also noticed, that the sorting / product order of the products has changed after the latest update, but I I'm not sure if those two things are related.

#2041241

Shane
Supporter

Languages: English (English )

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

Hi Maximilian,

Thank you for getting in touch.

What is actually happening here is that you're viewing a Taxonomy Archive and 100-de has the same 100 taxonomy term that is assigned to the products.

The archive will list out all the posts that have this taxonomy term assigned. On the archive selection it shows a notice that "This archive will include Products, Serien"

Thanks,
Shane

#2041847

Hi Shane,
while I understand your explanation, I don't understand why the behaviour has changed after the latest update.

I have now downgraded toolset because it was causing all sorts of problems.
I run my website on two domains (domainA.de / domainB.de) and they are both pointing to the exact same installation. After the most recent update, my product list disappeared and I had to go to /wp-admin/admin.php?page=wpv_wc_views to reassign the template for the products to show up again.

The same happened with the latest version of toolset, but now the menu of WooCommerce Blocks has moved to settings. After I tried to save the settings I got a critical error which prevented me from opening the settings page again and forced me to install a backup I made.

I'm asking you to please review the code of your latest updates again as it is causing lots of problems. If you need any help on pin pointing the problems please let me know.

#2042263
2021-05-04 11_51_57-Einstellungen ‹ HOLMCO — WordPress.png

Also, once I have chosen to use toolsets template files for wordpress archive and single pages, the option disappears and there is no way to switch back to the themes template files.

Now my layout is broken and there is no way to go back.

What is the intendet workflow on that. Where can I customise the template file provided by toolset?
For example there are breadcrumbs as default on the product archive. How am I able to remove them if I was to use the toolset template files?

#2042899

Shane
Supporter

Languages: English (English )

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

Hi Maximilian,

I know that there were changes done to the content templates for improvement with optimisation. I would need to do a full check on your site , would you mind if I took a copy of the site for further checks here locally ?

This way I can provide the site copy to our 2nd tier team with my findings ?

Please let me know.
Thanks,
Shane

#2043461

You can do that, but please note, that I installed a backup with an earlier version of toolset. So you would have to update the toolset plugins after you installed the copy.

#2048309

Shane
Supporter

Languages: English (English )

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

Hi Maximilian,

You should be able to resolve this with this hook below to exclude the Serien from the archive.

//exclude Serien from Serien loop
add_action( 'pre_get_posts', 'exclude_cpt' );
function exclude_cpt( $query ) {
    if ( $query->is_tax('serien-varianten') ) {
        $query->set( 'post_type', array('product') );
    }
    return $query;
}

Please add this to your custom code section in Toolset->Settings-> Custom code and ensure that you've activated it.

Thanks,
Shane

#2049901
#2050819

Shane
Supporter

Languages: English (English )

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

Hi Maximilian,

In response to your post. We have removed the ability to manually select the templates for WooCommerce Blocks as it was redundant. Instead what happens now is that when you've created a template and assigned it to the product whether a single product template or shop page template, it will use the Woocommerce Blocks compatible template automatically. When there is no template assigned the theme will determine how the products are displayed.

Now my layout is broken and there is no way to go back.

The way to let it revert to your theme's styling is deselect the products post type from your custom template and it should revert to the theme's way of displaying the template.

What is the intendet workflow on that. Where can I customise the template file provided by toolset?

The Toolset template is customized by creating a custom content template or archive for your products. So you wouldn't modify the physical php files to customize the template.

For example there are breadcrumbs as default on the product archive. How am I able to remove them if I was to use the toolset template files?

For the breadcrumbs if they are automatically added to the custom template then you can use the following to remove them.
hidden link

Please let me know if this helps.
Thanks,
Shane

#2052735

Thank you Shane, for the detailed help.
I'll get back to you in case I face any problems.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.