WordPress.org

Ready to get started?Download WordPress

Forums

Event Organiser
[resolved] Image thumbnail not working (12 posts)

  1. Damon Cook
    Member
    Posted 2 years ago #

    I place the following in one of Pages and page does not display properly:
    [eo_events event_category="featured-2"]%event_thumbnail%<a href="%event_url%">%event_title%</a> on %start{jS M Y}{ g:i:a}%, at %event_venue%[/eo_events]

    but take away the %event_thumbnail% and everything works/displays honky-dory. Suggestions please? Am I supposed to wrap the %event_thumbnail% in something?

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

  2. Damon Cook
    Member
    Posted 2 years ago #

    Perhaps I'm missing something. How does one set an event's thumbnail? Does one just add an image to the event via TinyMCE WYSIWYG field, or is it a Custom Field attribute?

  3. Stephen Harris
    Member
    Plugin Author

    Posted 2 years ago #

    Hi Damon. The thumbnail is the 'featured image' that is normally supported by most themes. When you create/edit an event, click 'screen options' at the top. If there is a checkbox for 'featured image', then your theme supports it, but it just may be hidden. If it is supported and selected, it should appear as a seperate meta-box on that page.

    Hope that helps!

  4. Damon Cook
    Member
    Posted 2 years ago #

    Thanks Stephen. And for anyone that comes across this here is a little more detail. In order to enable Featured Images in your theme you typically just add: add_theme_support('post-thumbnails'); in your functions.php. Mind you that you can also specify Featured Images on just Pages: add_theme_support('post-thumbnails', array('page')); or just Posts: add_theme_support('post-thumbnails', array('post')); but in this case you have to use the first, most general scenario in order to allow Event Organiser to do its thing. Too bad there wasn't a way to hook into Event Organiser and have something like: add_theme_support('post-thumbnails', array('eventorganiser')); in case somebody wanted to have granular control on where Featured Images are allowed. Stephen, do you know if that is possible?

  5. Stephen Harris
    Member
    Plugin Author

    Posted 2 years ago #

    Events are a custom post type called 'event. I've not tested it, but add_theme_support('post-thumbnails', array('event')); should work.

  6. Damon Cook
    Member
    Posted 2 years ago #

    YESSS!! Works nicely, thanks!

  7. markafoote
    Member
    Posted 1 year ago #

    Trying to get thumbnails on the event list on a page. This looks like a plain unordered list, could use a little visual!

    I added:

    add_theme_support('post-thumbnails', array('event'));

    to functions.php in my child theme. Also tried:

    add_theme_support('page-thumbnails', array('event'));

    since the events are on a page. Nothing happening. Theme is
    Weaver-ii, and it does have featured image, and I do have an image in there for the event. Clicking on the event on the page where I have the event list, I do go to the event and I have an image there, that's all working nicely. No chance of thumbnails on the event list? Site is not public yet.

    Thanks, Mark

  8. markafoote
    Member
    Posted 1 year ago #

    Ok, never mind!

    Found your code tags [eo_events][/eo_events] and attributes (it's all right here: http://wp-event-organiser.com/documentation/shortcodes/event-list-shortcode/), and I'm using this just fine:

    [eo_events]%event_thumbnail%
    %event_title%
    on %start{jS M Y}{ g:i:a}%
    %event_content%
    [/eo_events]

    works great in connection with featured image, which my theme permits. thanks. So impressed with your documentation and follow-up on the forum; yers Mark

  9. Stephen Harris
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Mark,

    Yup the default templates suck at the moment. I'm fixing that with 1.7.

    Basically the intention is that you can edit the templates to include any of the details about events/venues etc you like and style it to fit your theme.

  10. markafoote
    Member
    Posted 1 year ago #

    Thanks for taking the time, Stephen.

    Now that I have the thumbnails working using the [eo_events][/eo_events] tags (or if I prefer the entire event description in the event listing with its images), I am happy camper.

    I will look forward to 1.7, but I love shortcodes as well. What took me a second was realizing that you were talking about a shortcode with parameters, as it were, in the discussion on event_list_shortcode in the link above. I thought you were talking about something added to the PHP; my ignorance.

    I would put a word on the page with the shortcodes, showing the useage; I looked at those shortcodes and I assumed that was it, the rest was code.

    Keep up the great work, I do thank you and if I get more folks looking to put together websites using your plugin, I will make you a contribution. So far I have one client, but I'm hoping!

    cheers.

  11. markafoote
    Member
    Posted 1 year ago #

    meaning the page where you list only five shortcodes including [eo-events], but no tag-like short-codes ([eo-events][/eo-events]).

    that page is:

    http://wp-event-organiser.com/documentation/shortcodes/

    the page I meant to link above, with the tag-like short-codes, is:

    http://wp-event-organiser.com/documentation/shortcodes/event-list-shortcode/

  12. Stephen Harris
    Member
    Plugin Author

    Posted 1 year ago #

    What took me a second was realizing that you were talking about a shortcode with parameters

    - nope (though you can), you can also edit the actual templates for displaying events, the venue page, a single event page etc. And you can use the native WordPress functions (such as the_post_thumbnail() to do that).

    That said, that's what 1.7 will be doing - but not all sites want the same thing or look the same - so the plug-in allows you to override the default templates with ones in your theme to give you complete control over how things look (there are also templates for the shortcode/widget in 1.7).

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic