• Resolved Alkorr

    (@alkorr)


    I love this plugin and I’ve been trying to make it look perfect but unfortunately, there is something I can’t do: customize the shortcode list.

    I use this function:

      <?php echo do_shortcode(‘[eo_events]%event_title%%start{d F Y} { g:i:a}%[/eo_events]’); ?>

    But I want to get rid of the ul and li. So I checked http://wp-event-organiser.com/documentation/editing-the-templates/ and then I uploaded the shortcode-event-list.php file on my hard drive but apparently, it’s not the right file:

    The template is used for displaying the [eo_event] shortcode *unless* it is wrapped around a placeholder: e.g. [eo_event] {placeholder} [/eo_event]

    So I thought maybe modifying the CSS could help:

    ul.eo-events-shortcode{
    margin:0 !important;
    list-style:none !important;
    float:left !important;
    }
    ul.eo-events-shortcode li{
    margin:0 !important;
    list-style:none !important;
    float:left !important;
    }

    But it doesn’t…

    I’ve check everything (author website, internet…) but I’m unable to customize the way the list of events is showing on my index.php.

    All I want is to be able to show the (clickable) event title <line break> date/time <line break>, but I can’t.

    Thanks for your help!

    http://wordpress.org/extend/plugins/event-organiser/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter Alkorr

    (@alkorr)

    I still didn’t find a way to do it…

    Anyone?

    Plugin Author Stephen Harris

    (@stephenharris)

    Hi Alkorr,

    In 1.7, if you’re using the [eo_events] shortcode ‘as is’, then the template used is templates/shortcode-event-list.php – so you can copy that into your theme and make any changes there (including changing the surrounding ul and li tags). You can also modify want appears for each event (see this page).

    Adding in alternative CSS should work too, but you probably want to put that in your theme’s style.css.

    Thread Starter Alkorr

    (@alkorr)

    Hi Stephen, thanks for your reply!

    The alternative CSS has of course been put in my theme’s style.css, but it doesn’t seem to work since these classes are still called and not modifyed by my CSS:

      <ul class=”eo-events eo-events-shortcode”><li class=”eo-event-cat-human-rights eo-event-past”>

    Do you know why?

    I can’t use the [eo_events] shortcode ‘as is’ because I need to show the title then below the date/time. Unfortunately, the function I used to use doesn’t work anymore:

      <?php echo do_shortcode(‘[eo_events]%event_title%%start{d F Y} { g:i:a}%[/eo_events]’); ?>

    Instead I get:

      Medical Conference
      %start{d F Y} { g:i:a}%

    Any idea?

    So I can’t use the template shortcode-event-list.php even though I copyed it into my theme and changed the surrounding ul and li tags.

    Also, the link you provide doesn’t work 😉

    Thread Starter Alkorr

    (@alkorr)

    I don’t why but now the shortcode is working again:

    <?php echo do_shortcode(‘[eo_events]
    %event_title%
    %start{d F Y}{g:i:a}%
    [/eo_events]’); ?>

    Unfortunately, I can’t get rid of the ul li stuff…

    Like I said, I can’t use the [eo_events] shortcode ‘as is’ because I need to show the title then below the date/time so which template can I edit if not templates/shortcode-event-list.php?

    Plugin Author Stephen Harris

    (@stephenharris)

    Hi Alkor,

    Sorry I’ve taken a while to respond to this thread.

    If you want remove the ul and li tags, then you cannot use the %event_title% etc placeholders. The plug-in will then use the template templates/shortcode-event-list.php – which you can copy to your theme and edit it there.

    Not only can you remove the ul,li stuff, but you can also edit *what* is displayed (e.g. event title, date, venue etc) and where. So you can achieve what you want through editing that template file. (Using the available API functions)

    (R.e. the css not working – I can’t help there I’m afraid, the plug-in doesn’t add any css to the event lists but just relies on the theme to provide the styling).

    Thread Starter Alkorr

    (@alkorr)

    Ok, understood, took me some time to get it right but it works fine now. Thank you Stephen!

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

The topic ‘How to customize [eo_event] shortcode list?’ is closed to new replies.