• Resolved trevolutionary

    (@jkdsouljah)


    Hi there,

    I have a text widget in my sidebar that looks something like the following. I am not sure exactly what I did, but the embedded shortcodes (e.g. [button color=”red” style=”flat” url=”#bookingform”]Book now[/button]), which WERE working without any problem, are no longer working. The shortcode is simply echoed. However, anywhere else within the widget outside of the [event] shortcodes, shortcodes and embedded shortcodes are processed with no problems.

    [event]<p><strong>Event:</strong> #_EVENTNAME</p>
    <p><strong>When:</strong> #_EVENTDATES, #_EVENTTIMES</p>
    
    {has_location}
    <p><strong>Location:</strong> #_LOCATIONNAME</p>
    
    <i style="font-size:0.9em;color:#999;">#_LOCATIONNOTES</i>
    {/has_location}
    
    {has_spaces}[box color="blue"]This event still has spaces available.[/box]
    
    [button color="red" style="flat" url="#bookingform"]Book now[/button]{/has_spaces}
    
    {fully_booked}
    [box color="red"]<strong>This event is now fully booked. Thank you.</strong>[/box]
    {/fully_booked}
    [/event]

    I must be overlooking something simple, but I’m just not seeing it right now. Any help would be greatly appreciated.

    https://wordpress.org/plugins/events-manager/

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Support angelo_nwl

    (@angelo_nwl)

    using this shortcode [event] – try something like [event event=”X”] where X is the event id.

    Thread Starter trevolutionary

    (@jkdsouljah)

    That’s not necessary because it’s only being displayed on the event page itself. The information drawn from the event is all correct. It’s only the third-party shortcodes which are not working within the EM shortcode.

    Plugin Support angelo_nwl

    (@angelo_nwl)

    at the moment you might need additional coding to make this work.

    eg. events-manager/em-shortcode.php

    I am not sure if this will solve your problem… but I use another plugin for “nested” shortcodes.
    https://wordpress.org/plugins/nested-shortcodes/

    which thusly allows for a situation similar to yours.

    Thread Starter trevolutionary

    (@jkdsouljah)

    The thing is that this WAS working, and then not, for no apparent reason because nothing changed. lol

    Anyway, Robswaimea, I’ll give that a shot, thank you.

    Are you using #bookingform or #_BOOKINGFORM ?

    The second is correct, the first is wrong.

    Thread Starter trevolutionary

    (@jkdsouljah)

    This is separate from the bookingform, which is working fine. This is simply a widget displaying event details in the sidebar.

    I’m asking because that’s the placeholder you’re using in the code snippet you posted.

    Thread Starter trevolutionary

    (@jkdsouljah)

    Oh, no – that is simply an anchor link to scroll the user down to where the form actually is.

    I think the issue here is that by default shortcodes cannot be nested. Maybe there was a code snippet running to allow that which was lost on a plugin or theme upgrade?

    You might want to take a look at the plugin @robswaimea suggested for a solution.

    Thread Starter trevolutionary

    (@jkdsouljah)

    Tried the nested shortcodes plugin, but it didn’t help in this instance. I can rule out the possibility of a theme-issue (it was working with the same theme before), but I have indeed upgraded EM. Thanks all for your advice.

    I think you’ll need to find some kind of custom code as a workaround because nested shortcodes are allowed in WordPress by default.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Shortcodes within Shortcodes’ is closed to new replies.