For awhile we've been using the following conditional argument
[wpv-conditional if="( is_archive() ne '1' )"]
to hide our sites' breadcrumbs from the excerpts seen in the search archives. This being a solution we've come across from your support forums, it has worked well for us while we were using the legacy Toolset legacy plugins.
That said, we've recently converted our development stack to the current Toolset model that no longer utilizes the legacy plugins, so we're still finding areas where we can improve and areas that quite work as well as they used to. One of these areas is the use of the is_archive argument.
You can see the page where this is an issue here: lien caché
Please see attached to see what I'm talking about.
For context, our pages are built out using Divi, so the breadcrumbs are baked into the body content of each page and post that needs them. Using a Toolset conditional argument has been our means of keeping the breadcrumbs from showing up in post excerpts seen in the archives. However, since the breadcrumbs are now showing up in the post excerpts, it creates a reading issue and is confusing to the user, especially since the output doesn't even pertain to the specific page it's embedded from within the post loop output. And yes, the function is configured in the "Functions inside conditional evaluations" section in the Toolset Settings.
It's quite possible this stopped working a long time ago, and now I'm now just noticing it, but any help in this matter would be greatly appreciated.
Hello,
I can login into your website, please provide more details for the problem.
Where did you put the shortcodes?
[wpv-conditional if="( is_archive() ne '1' )"]
I have checked the Toolset WordPress Archive:
lien caché
But did not find above shortcode.
You won't find them on the search archives, as the conditional argument is embedded directly onto the content pages on the site (ie. About Us, Services, Industries). Please see attachment screenshot.png
Because whatever you build into a Divi page exists within the post body, it gets output into the excerpt, though previously this conditional argument worked to keep the breadcrumbs out of the post excerpt in the loop output.
The conditional argument still currently works on sites we've developed using Toolset's Legacy plugins. Please see attachment screenshot-2.png (lien caché), which uses this conditional argument in the same kind of application (wrapping around breadcrumbs).
As I mentioned above, I need detail step to reproduce the same problem:
Where did you put the shortcodes?
[wpv-conditional if="( is_archive() ne '1' )"]
Please point out the URLs, I need to test and debug those codes.
My apologies. The following pages have the conditional logic wrapping their breadcrumbs:
- lien caché;
- lien caché;
- lien caché;
- lien caché;
- lien caché;
- lien caché;
As I explained above, and illustrated in my screenshots, I put the conditional shortcodes into the Divi built pages. You will find them in modules labeled "Breadcrumbs [Shortcodes]".
Hi,
Luo is on vacation so I'll be following up on this ticket.
I'm currently performing some tests on my website, with a similar setup and will share the results, as soon as this testing completes.
Thank you for your patience.
regards,
Waqar
Great, thank you. I appreciate it. I will be going on vacation as well, so it may be a week or so before I can respond back to this thread.
Have a nice vacation and I'll be able to share my findings, by the end of the day today.
Thank you for waiting and here are my findings.
The conditional check that you're using checks for archives (is_archive), but not for the search results page ( e.g. {yourwebsite.com}/?s=aegis&wpv_view_count=753 ).
[wpv-conditional if="( is_archive() ne '1' )"]
[yoast-breadcrumbs]
[/wpv-conditional]
To extend this condition to also cover the search results page, you can include the "is_search" function joined with the 'AND' operator:
( ref: https://developer.wordpress.org/reference/functions/is_search/ )
[wpv-conditional if="( is_archive() ne '1' ) AND ( is_search() ne '1' )"]
[yoast-breadcrumbs]
[/wpv-conditional]
Note: please add "is_search" in the "Functions inside conditional evaluations" section, at WP Admin -> Toolset -> Settings -> Front-end Content.
After that, the breadcrumb text will be excluded from the search results page too.
Great! It appears to be working now. Thank you so much for your assistance!