using shortcode with argument

how to use shoetcode with argument if

i want to display only active events belong to a particular category it ‘6’ such as 5 events are shown on a page in the order of time left to expire i.e the first to expired is placed first

  • PC
    • WPMU DEV Initiate

    Hiya,

    Greetings and thanks for posting on the forums.

    You can look that under the shortcodes tab in Events plus.

    Tag: [eab_archive]

    Arguments:

    network – (boolean) Query type

    date – (date) Starting date – default to now

    lookahead – (boolean) Don’t use default monthly page – use weeks count instead

    weeks – (integer) Look ahead this many weeks

    category – (string or integer) Show events from this category (ID or slug)

    limit – (integer) Show at most this many events

    order – (ordering keyword) Sort events in this direction

    class – (string) Apply this CSS class

    template – (string) Subtemplate file, or template class call

    override_styles – (boolean) Toggle default styles usage

    override_scripts – (boolean) Toggle default scripts usage

    I hope that helps. Please feel free to ask if you have more questions on the same.

    Cheers

    PC

  • PC
    • WPMU DEV Initiate

    suppose i want to display events belong to category id’s are 43, 28 and 29

    in the order of time left to expire i.e the first to expired is placed first

    then the code should be

    [eab_archive.category=43,28,29.order=”ASC”]

    is it correct?

    it will be

    [eab_archive category=”43,28,29″ order=”ASC”]

    And one more question how to display expired events with same above condition

    can [eab_expired] be used with same arguments like

    [eab_expired.category=43,28,29.order=”ASC”]

    The format will be same as I posted above, however I have called Ve to confirm if the same arguments are available for this shortcode too.

    Tag: [eab_expired]

    Arguments:

    class – (string) Apply this CSS class

    template – (string) Subtemplate file, or template class call

    override_styles – (boolean) Toggle default styles usage

    override_scripts – (boolean) Toggle default scripts usage

    Cheers, PC

  • Vladislav
    • Dead Eye Dev

    Hello,

    I’d like to point out a restriction, currently only one category ID (or category slug) is accepted per shortcode, so comma-separated list of categories won’t work. Also, the expired events shortcode doesn’t currently support filtering by category. I can see how both of these features would come in handy, so this is definitely going to the list of enhancements for the next plugin release.

  • Vladislav
    • Dead Eye Dev

    Hello,

    Just to quickly update – the latest plugin release (v1.6.1, just released) supports multiple categories filtering in the shortcodes, via the new “categories” attribute. So, to achieve what you wanted, the shortcode could look something like this:

    [eab_archive categories="43,28,29" order="ASC"]

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.