Sauter la navigation

[Résolu] Conditional using shortcode in if not working

This support ticket is created Il y a 4 années et 10 mois. 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)

Ce sujet contient 17 réponses, a 3 voix.

Dernière mise à jour par chrisH-10 Il y a 4 années et 9 mois.

Assisté par: Shane.

Auteur
Publications
#1541237

Shane
Supporter

Les langues: Anglais (English )

Fuseau horaire: America/Jamaica (GMT-05:00)

Hi Chris,

I've tried to replicate on a fresh install once more but still unable to replicate. At this point i've stripped the copy of your site to the bare bones basics and the issue is still there.

What I did is to submit this duplicator package to our 2nd tier supporters along with a copy of my test site for further debugging to see if they can identify the issue.

Once I have any information I will let you know.

Thanks,
Shane

#1541333

Shane, thank you for your diligent work.

#1542123

I think this all comes down to an error on my part. Surprise?!

This is in reference to earlier in the thread where I showed inconsistencies with the use of $parent and $current_page in the View "Index: Child pages of categories (Pillar)" when we reference the fields index-description-2 & index-description-3.

I found that due to the site's particular setup it must be $current_page. The $parent reference is to the last item in the loop (third item in this case). That page (third in the loop) however may have a different parent page. The View uses the categories category and category-alt to find the item in the loop.

By way of explanation we use the page hierarchy to set the primary, canonical home of the page for SEO purposes. Pages can however show up on other categories as well.