• I have the following embedded events on http://steeplechasers.org/competition/

    [event_embed category=”grand-prix” from=”2015-01-01″ to=”2015-12-31″ limit=”100″]
    * {start_date} – {title}
    [/event_embed]

    I made the event data part of a list item using the visual editor, showing above with *

    This creates

    <ul>
    <li>date - title</li>
    </ul>

    around each event. Is there any way to move the <ul> part to be around the whole list?

    Also, I want to include location of the venue, but the documentation does not show how. a) is this possible?, or, b) can this be added?

    https://ww.wp.xz.cn/plugins/event-rocket/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Barry

    (@barryhughes-1)

    Unless I’m mistaken, I think something else is responsible for generating the <ul> wrapper. By itself the inline parser won’t do anything so magical.

    Thread Starter lking57

    (@lking57)

    Yes, this appears to be some interaction between the visual editor and event rocket. Note: I also have WP Edit plugin. I do not believe WP Edit plugin causes this behavior of lists, as it is supposed to simply add additional buttons to the editor.

    The code below is rendered at http://steeplechasers.org/test-event-rocket-list/ . I think these are all the possible permutations on how to configure event rocket using the visual editor, yet I cannot seem to make the <ul> wrap outside the list.

    I have annotated the code with * where I created list item using visual editor

    event_embed\n(list) {start_date} - {title}\n/event_embed
    
    [event_embed category="equalizer" from="2015-01-01" to="2015-12-31" limit="100"]
    * {start_date} - {title}
    [/event_embed]
    
    event_embed\n(list) {start_date} - {title}/event_embed
    [event_embed category="equalizer" from="2015-01-01" to="2015-12-31" limit="100"]
    * {start_date} - {title}[/event_embed]
    
    (list)event_embed{start_date} - {title}\n/event_embed
    
    * [event_embed category="equalizer" from="2015-01-01" to="2015-12-31" limit="100"]{start_date} - {title}
    [/event_embed]
    
    (list)event_embed {start_date} - {title} /event_embed
    
    * [event_embed category="equalizer" from="2015-01-01" to="2015-12-31" limit="100"]{start_date} - {title}[/event_embed]
    Plugin Author Barry

    (@barryhughes-1)

    So it seems perhaps the visual editor is happening on what it thinks is a mistake (list items outside of a list element) and is trying to help out by correcting things.

    If that’s so, perhaps you could simply switch to text mode?

    Alternatively, you could define a couple of new placeholders that let you write something like this:

    [event_embed] {li:open} {start_date} ...etc {li:close} [/event_embed]

    And/or you could switch away from inline templates to an actual PHP template.

    Thread Starter lking57

    (@lking57)

    Thanks for the hints

    Text mode is not an option — I need to make sure page updates can be done by lay people.

    Similarly php won’t work for me I think, as there is a lot of text around these embedded lists. See http://steeplechasers.org/competition/ for the real page I am using [event_embed] on.

    But I hadn’t noticed the advanced customization documentation. I will see if I can make that work. Just need to figure out how to trick the visual editor to putting the <ul> </ul> tags in around the [event_embed] [/event_embed]

    I guess advanced customization also answers my question in the OP about location.

    Thanks.

    Plugin Author Barry

    (@barryhughes-1)

    Great.

    If it proves tricky to get those <ul> tags in place, there is also a filter you can use – eventrocket_embed_post_output – so you could possibly do something like this:

    add_filter( 'eventrocket_embed_post_output', 'wrap_ee_in_ul' );
    
    function wrap_ee_in_ul( $html ) {
        return "<ul> $html </ul>";
    }
    Thread Starter lking57

    (@lking57)

    Thanks – good info, but I don’t think that will work for me because (I assume) that would apply globally for all embedded events. I also have at least one page where the embedded event is not a list item.

    Great plugin, by the way, although, seems like this should be part of The Events Calendar base functionality. But you saw a need and you filled it, to my appreciation.

    Plugin Author Barry

    (@barryhughes-1)

    Thanks – I appreciate you saying so 🙂

    … and you’re right that snippet would apply to all usages of embedded events, but the dirty hacker in me would suggest keeping it in your back pocket as a valid option even so – testing within the callback for the presence of <li> tags and the absence of <ul> tags (then wrapping if so, otherwise returning the html unadultered) would be a functional solution if nothing else 😉

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘list configuration and additional fields’ is closed to new replies.