Archived topic
Page header: Can't insert shortcode for a 'Spot'
10 replies · Started by Andy on March 11, 2017
Hiya, I can see that shortcodes work in the Page Header 'content' section, but when I try to use one to show the content of a 'Spot' ('Spots' plugin) it just displays the shortcode notation. (I'm trying to use a Spot as it has the TinyMCE features for editing). Is this something I can fix at your end, or should I contact them? Cheers!
Hi Andy,
No actions is needed to enable shortcode on GP's end.
Make sure the shortcode has a function attached to it in order for it to render.
Let me know if this helps.
A good way to test is using it in your regular content.
Hi Leo and Tom - thanks for the reply... the shortcode works fine when added to the main page content inside the TinyMCE box, but not in the Page Header box: See this test site: https://inspiredbusinessmarketing.com/dev/demo/test-page/
Sorry I could be wrong but "This is the content inside the 'Spot' looks like it's inserted in the content?
It doesn't have any of the plug's class/ID that I can see...
Hi Leo - not sure I follow... I have added the shortcode [icitspot id="20"] to BOTH the Page Header box and the page's main TinyMCE edit box. So when the page is displayed, the main content shows what it should (the text: "This is the content inside the ‘Spot’"), but where I added the shortcode to the Page Header content box it just shows the shortcode text in white. I don't understand how the shortcode works in one place but not the other.
Huh, that's strange.
Can you share the function you're using to create the shortcode?
Hi Tom - it's the shortcode to insert a 'spot' from the 'Spots' plugin: https://wordpress.org/plugins/spots/
Hmm, not sure why it wouldn't work, as the page header textarea runs through the do_shortcode() WordPress function.
Might be worth asking the developer of that plugin if it will only run inside the WP content and no where else.
Okay - will do. Thank you for looking, Tom :)
Edit: I have been able to get this to work by creating a custom shortcode to insert the Spot (with a parameter of the Spot's name), but this relies on the user (client) typing it all in correctly. I shall persevere with the plugin authors.
Must be something in their plugin preventing it.
Let me know what they say :)