WordPress.org

Ready to get started?Download WordPress

Forums

Event Organiser
[resolved] Automatically insert event metas (4 posts)

  1. Patrick
    Member
    Posted 1 year ago #

    Hi there.

    Thanks for this plugin which is far the best I've found to manage events.

    My question is more a feature request : I've notice some plugin can automatically insert code in archive / single page (I'm thinking about AddThis for example). Is it possible to do the same with Event Organiser and the event-related metas ?

    Because I'm using a weird template, in which I didn't succeed to design a custom template for Event Organiser... Plus, it will allow to automatically update outpout when the plugin / the template will be update : no more coding needed !

    Thanks !

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

  2. Stephen Harris
    Member
    Plugin Author

    Posted 1 year ago #

    There are potentially plans to have a simple 'plug and play' option - which adds content automatically - but this won't be very (if at all) customisable.

    The problem with using this method with something like events is that people use the plug-in for a wide range of purposes - and according will want their page laid out in a certain way with certain information. Adding this in automatically and adding options to change it is a nightmare in terms of UI, restrictive in what you can offer and ultimately the wrong way to do it.

    By using templates which can be over-ridden in the theme - the design and layout of the page can be taken over by the theme with template files (as it should be) - rather than the plug-in. Of course, editing the templates does require a bit of knowledge :).

  3. Patrick
    Member
    Posted 1 year ago #

    Is there a php function like "if is event" ?

    Trying to improve my knowledge ^^

  4. Stephen Harris
    Member
    Plugin Author

    Posted 1 year ago #

    Yup, if you have a post ID stored in $post_id, (inside the loop you can get this with get_the_ID():

    if( 'event' == get_post_type($post_id) ){
            //Post is an event
        }else{
            //Post is NOT an event
        }

    See the Codex: http://codex.wordpress.org/Function_Reference/get_post_type

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags