- This topic has 2 replies, 2 voices, and was last updated 4 years ago by yonahs61332.
-
AuthorPosts
-
August 16, 2020 at 2:34 pm #28981yonahs61332Participant
I understand that the [] are used as conditional tags, so how am I supposed to enter a shortcode?
I have tried [shotcodeText] one and it just displays the ShortCode as text
I am talking about the Advanced Fields section on Advanced Options->Content
I have tried the “Execute them” and “Remove Them” options
August 17, 2020 at 9:33 am #29000Ernest MarcinkoKeymasterHi,
In short, you cannot enter shortcodes there. Most shortcodes are registered in a loop or single content sections, and may require additional parameters to work.
The only way you should try that, is programatically adding the shortcode to the content via the asp_results hook.
Something like this:
add_filter( 'asp_results', 'asp_add_custom_shortcode', 10, 1 ); function asp_add_custom_shortcode( $results ) { foreach ($results as $k=>&$r) { // Enter the shortcode into the quotes section $r->content = do_shortcode('[my_shortoce_here]') . $r->content; } return $results; }
Still, this may not work, as shortcodes should be optimally added inside the post editor directly, otherwise they might not process correctly.
September 14, 2020 at 11:07 am #29334yonahs61332ParticipantOk, I have solved my problem, I have customized the Horizontal template and the shortcode HTML is there, but there is still a problem and the solution seems simple enough, but I need some help implementing it:
https://support.yotpo.com/en/article/loading-yotpo-with-ajaxHow can I run this javascript widget at the right time without your plugin?
Thanks
- This reply was modified 4 years ago by yonahs61332.
-
AuthorPosts
- You must be logged in to reply to this topic.