Skip Navigation

[Closed] Conditional Shortcode Display Stopped Working

This support ticket is created 3 years, 7 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.

Our next available supporter will start replying to tickets in about 0.66 hours from now. Thank you for your understanding.

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/Karachi (GMT+05:00)

Author
Posts
#2006519

J S

I am trying to:

You previously helped me set up conditional displays of custom social link fields IF they had a value in this post:

https://toolset.com/forums/topic/social-links-conditional-in-loop-on-profile-page/

In updating this view, the conditional has stopped working properly and now shows all icons regardless of whether they have a link value in the field or not, only for those that have blog posts. For those without posts, the social icon fields are showing up blank even if they have social link values.

Link to a page where the issue can be seen:

Click on these users: hidden link

For example, this user hidden link has posts and it is then showing that she has all social links even though she does not.

In contrast, this user hidden link has 2 social links but none are showing up as they have no blog posts.

This was all working fine and nothing changed in the shortcode since it was last working properly, but other elements on the page were updated and the page was saved which seems to have broken the code.

Login credential are posted. Please fix as I need to launch this site today!!

Thank you!!

#2007141

Hi,

Thank you for contacting us and I'd be happy to assist.

While I can see the issue on your website, I couldn't reproduce this on my test website, with similar fields, custom shortcodes, and conditional code blocks. This suggests that something specific to your website is involved.

Have you added any new custom code or plugins, recently?

Can you please share a clone/snapshot of the website, so that it can be investigated on a different server, without affecting the actual website?
( ref: https://toolset.com/faq/provide-supporters-copy-site/ )

We usually recommend the plugin “Duplicator” (http://wordpress.org/plugins/duplicator/) for this, but some hosts like WP Engine are known to block it.

In that case, you can create a backup file using the "All-in-One WP Migration" plugin:
https://wordpress.org/plugins/all-in-one-wp-migration/

Note: I've set your next reply as private.

regards,
Waqar

#2007367

J S

The previously sent credentials are ok to use and the link is a copy of this website on a different server so please go ahead and troubleshoot. I need this to work ASAP as we are supposed to go live today. There are no recently installed plugins since this was last working! Thank you!

#2009055

Thank you for waiting.

I've performed a number of tests on your website and my test website, but couldn't narrow down why the same code is working on my test website, but not on yours.

Can you please perform a quick test by removing the code for the custom shortcodes "archive-author-id" and "get_author_in_archive_value_check" from Toolset's custom code section and then add it in the active theme's "functions.php" file?

In case the issue still persists, I'll need your permission to download a clone/snapshot from the website and debug this on a different server, in more depth.

#2009181

J S

Hi Waqar,

I found the issue. The plugin when the plugin FacetWP is enabled, the shortcodes above stop working correctly and cause the described symptoms. So I will not be using that plugin for now but perhaps you can troubleshoot the issue related to that plugin and why it breaks your code? hidden link

Thanks
JS

#2010241

Thanks for the update and glad that it has been narrowed down.

To investigate this compatibility issue, I'll need a clone/snapshot of a website where the FacetWP plugin is activated and the issue can be reproduced.
( https://toolset.com/faq/provide-supporters-copy-site/ )

Note: I've set your next reply as private.

The topic ‘[Closed] Conditional Shortcode Display Stopped Working’ is closed to new replies.