However their shortcode was not rendering on the frontend.
Solution:
Issues like these actually requires that you debug the shortcodes. Now since this is custom coding we don't normally debug custom codes.
However since this was a simple implementation a little discretion was used.
In our Toolset Custom Code editor, your shortcode can't be activated if an error is detected and this was the case with this user.
Checking the code we can see that the user has 'author_name' => $atts('author')
Where $atts is an associative array. Now the correct way to slice this array with the key is $atts['author'] using square brackets instead of the round ones.
So I would recommend going through your code to ensure that the correct calls are being made
This support ticket is created 5 years, 11 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.
I have two shortcodes [check_if_dealer] and [get_dealer_url], I registered both shortcodes in Third-party shortcode arguments, but don't know why only one can be rendered, what syntax I did wrong to another one?
Yes, thanks for your update. I will update the condition but it can't solve my question.
My question is the shortcode could not be rendered, I have two shortcodes [check_if_dealer] and [get_dealer_url] but only [check_if_dealer] could be rendered. Refer to the screenshot, you can find the [get_dealer_url ....] didn't be rendered. What is the problem?
I don't think it is affected by the comment <!-- -->, if you view the screenshot carefully, you can find the [check_if_dealer] was rendered but not the [get_dealer_url ....]
I don't have the idea to the Custom code from Toolset > Setting, I put the PHP code of [check_if_dealer] in functions.php, it works but [get_dealer_url ....]
I added the snippet get_dealer_url, it created a script "get_dealer_url.php" under wp-content/toolset-customizations/get_dealer_url.php, what is the difference compared to functions.php
When I place my get_dealer_url() from my fuctions.php into the Custom code snippets, I click Save and Test, I got
There was an error when updating snippets.
I don't know what error it is.
I activated the code snippet, but no help to it.
Please note the check_if_dealer is also inside the comment, get_dealer_url doesn't work (see screenshot)
Fatal error: Cannot redeclare get_dealer_url() (previously declared in /home/hircar/public_html/hosting/hicar.com.hk/www/wp-content/themes/toolset-starter-child/functions.php:4) in /home/hircar/public_html/hosting/hicar.com.hk/www/wp-content/toolset-customizations/get_dealer_url.php on line 16