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

  1. jdkeu456
    Posted 3 years 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.


  2. agelonwl
    Posted 3 years 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
    Posted 3 years 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
    Posted 3 years 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
    Posted 3 years 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
    Posted 3 years ago #

    yes, try using shortcode in your wp pages

    then add conditions to events-search.php

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Events Manager
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic