Skip Navigation

[Resolved] Archive page and custom post type url questions

This support ticket is created 5 years, 9 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 1 reply, has 2 voices.

Last updated by Luo Yang 5 years, 9 months ago.

Assisted by: Luo Yang.

Author
Posts
#1222856

Dear Luo,

Thank you very much - this structure is exactly what I had in mind .

Two questions
1.
As far as I understand it, the archive page is not related to a 'Toolset view' or to an 'Elementor template'? Where should I start digging in order to get rid of the sidebar and get it to look similar to the other archive pages, e.g hidden link
I have updated the 'wordpress archive' you created so the image is correctly sized and the text details are correct.

2.
As you will see, I changed the custom post type url - I had named it 'destination-cpt' to make it easier to keep track of the url and it is now just 'destination'. That is also the reason why the taxonomy name is 'property-destination-taxonomy'. Tried to rename it 'property-destination' but realised that updating the taxonomy url and change the code in 'functions.php' is not sufficient - where in addition do I need to update the code.

Is there anything I can do to help you help me?

Best regards / john

#1222861

Hello,

Q1)
I assume we are talking about the URL:
hidden link
It should be in your theme file
hidden link

I suggest you copy theme file "archive.php" from parent theme folder "astra", save it into child theme folder "astra-child" as file name "taxonomy-property-destination-taxonomy.php", edit it, remove the PHP codes of sidebar

More help:
https://developer.wordpress.org/themes/basics/template-hierarchy/#custom-taxonomies

Q2)
I assume we are talking about the PHP codes in post:
https://toolset.com/forums/topic/the-views-are-not-doing-exactly-what-i-want-them-to-do/#post-1221376

As you can change the taxonomy slug in this line, from:

if ( ! is_admin() && $query->is_main_query() &&is_tax('property-destination-taxonomy') ) {

To:

if ( ! is_admin() && $query->is_main_query() &&is_tax('property-destination') ) {

More help:
https://codex.wordpress.org/Function_Reference/is_tax
$taxonomy
(string, array) (optional) Taxonomy slug or slugs