Hi, I'm creating a custom archive for a taxonomy.
I followed the instructions here: https://toolset.com/documentation/customizing-sites-using-php/creating-taxonomy-term-archives/
Created archive-benefit.php in the child theme.
Created a Toolset WordPress archive - hidden link
Archive taxonomy term page - hidden link
The new custom archive content is displaying but in full width of the page and with some of the theme archive content under it.
When I add some text to the file archive-benefit.php to test if editing this file works, it does not show in the page.
Screen recording of page layout - hidden link
I contacted Jnews theme and this is their response:
The content rendered on the custom taxonomy page you created is being rendered from the archive.php file.
It’s possible that the method you used to create a custom template for your custom taxonomy is not working, so the changes you made to the archive-benefit.php file are not affecting your custom taxonomy page. We recommend contacting Tooltip support for assistance with this issue.
Thanks.
Hi,
Thank you for contacting us and I'd be happy to assist.
To override the template file for the custom taxonomy 'benefit', the name of the file should be 'taxonomy-benefit.php'.
( ref: https://developer.wordpress.org/themes/basics/template-hierarchy/#custom-taxonomies )
You can rename that file and see if that makes any difference.
Tip: There are also plugins like 'which template file' available, which can help track down the exact template file that is being used:
https://wordpress.org/plugins/which-template-file/
I hope this helps and please let me know if you need further assistance.
regards,
Waqar