WordPress.org

Ready to get started?Download WordPress

Forums

Events Manager
[resolved] Show search-box and events of only one category on page (6 posts)

  1. jdkeu456
    Member
    Posted 1 year ago #

    Hi, I assigned a page in Settings/Pages/Event List and and activated "show searchbox". So this works fine and shows all events.

    Now I would like to filter the event-list by a category-id (initial page, before using search). Aim is to show events in a certain language which is defined by the category.

    The next problem is, I would like to have a second page to show a searchbox and the events of the second language/category.

    I understand that I cannot use shortcodes for this. Either the search or the listing will not work properly.

    Any Ideas? Thanks.

    http://wordpress.org/extend/plugins/events-manager/

  2. agelonwl
    Member
    Posted 1 year ago #

    Hi, have you tried to modify template file @ events-search.php or events-list.php; to use templates - http://wp-events-plugin.com/documentation/using-template-files/

  3. jdkeu456
    Member
    Posted 1 year ago #

    Thanks for ultrafast response. Yes, I modified the events-search.php to show only categories of one language in the category-dropdown successfully. But I cannot figure out where to filter events list by category in the events-list.php Probably in this line?: echo EM_Events::output( $args );

  4. agelonwl
    Member
    Posted 1 year ago #

    try something like

    $args['category'] = x; //where x is the category id e.g. $_REQUEST['category_id']
    echo EM_Events::output( $args );
  5. jdkeu456
    Member
    Posted 1 year ago #

    This works great, thanks a lot!

    One more question: is it possible to create a second page with searchbox and events for the other category/language?

  6. agelonwl
    Member
    Posted 1 year ago #

    yes, try using shortcode in your wp pages
    e.g.
    [event_search_form]
    [events_list]

    then add conditions to events-search.php

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic