Skip Navigation

[Resolved] HI I can't get my new archive template to attach to any terms.

This support ticket is created 3 years, 2 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 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 3 replies, has 2 voices.

Last updated by Luo Yang 3 years, 2 months ago.

Assisted by: Luo Yang.

Author
Posts
#2207513
WhenIsaveitwontstick.png
ArchivePagesToolset.png

I made a new archive template whos ID shows as 5194 in the list of archive templates. I named it "Leaf Level Jewelry Page."

I can't get any terms to save against it. I'm in the editor, I want to save it to a bunch of jewelry subcategories but I can click them all off, press save, and it doesn't save the attachment. It still shows it not used for any loops. The tax terms I clicked off do not persist after I save. I have tried chrome and brave but it seems like a php level save problem.

I tried forcing it for one of the subcats with this function

add_filter( 'wpv_filter_force_wordpress_archive', 'force_jewelry_subcats_archive', 30, 2 );
function force_jewelry_subcats_archive( $wpa_assigned, $wpa_loop ) {
echo "wpa_assigned is " . $wpa_assigned . "<br>";
if ( is_tax( 'product_cat', 'set-shirt-jewelry' ) ) {
echo "cat is set-shirt-jewelry";
//$wpa_assigned = 5194; <-- new template. Just shows blank page when I force it.
$wpa_assigned = 3523; //<-- existing template. forcing this one works fine.
}
return $wpa_assigned;
}

Here is the top level page that is using the older template just fine:
hidden link

Here is the subcategory page I can't get to link. It's picking up the default template.
hidden link

If there's a glitch in the page I could add the relationships in the database I just have no idea where that's stored.
Thanks.

#2207717

Hello,

The problem you mentioned above is abnormal, please check these:
1) Make sure you are using the latest version of Toolset plugins, you can download them here:
https://toolset.com/account/downloads/

2) In case it is a compatibility problem, please deactivate all other plugins, and switch to WordPress default theme 2021, and test again

3) Also check if there is any PHP/JS error in your website:
https://toolset.com/documentation/programmer-reference/debugging-sites-built-with-toolset/

4) If the problem still persists, please provide database dump file(ZIP file) of your website, you can put the package files in your own google drive disk, share the link only, also point out the problem page URL and WordPress Archive URL, I need to test and debug it in my localhost, thanks
https://toolset.com/faq/provide-supporters-copy-site/

#2208273

This seems like a ton of work to debug something I didn't write.

The other archive templates DO save their assignments without difficulty so I doubt it's a plugin interaction and I don't have time to chase this.

I solved it by... get this, checking what category I was on with that same code loop and then just dumping out css to hide the subcat links on the main template for leaf categories.

It has a "There I Fixed it" quality but life is too short. Thanks! 🙂

#2208519

Thanks for sharing the solution, it will help other users, please update here if you still need more assistance for it.