multiple events-list pages with different search form categories
-
I want to create multiple events-list pages.
I’ve already made an events-list page through the settings page with ‘events_search_form’ enabled.
<?php /* Template Name: FindFreeConsultPersonal // Template for eventslist with events search form for personal topics */ ?> <?php get_header(); ?> <?php global $EM_Event; // or use global $post ?> <h1 class="title">Title</h1> <div class="search-results-events"> <div id="main"> <?php the_content(); ?> </div><!-- /#main --> </div><!-- /.search-results-events --> <?php get_footer(); ?>
This worked fine for me.
Now, i want to create a separate page where business topics are listed, and certain topics in the search form are excluded.
<?php /* Template Name: FindFreeConsultBusiness // Template for eventslist with events search form for business topics */ ?> <?php get_header(); ?> <?php global $EM_Event; // or use global $post ?> <h1 class="title">Title</h1> <div class="search-results-events"> <div id="main"> <?php the_content(); ?> </div><!-- /#main --> </div><!-- /.search-results-events --> <?php get_footer(); ?>
I’ve modified the category search a bit.
<!-- START Category Search --> [...] <?php if ( is_page('personal')) { $selected = !empty($_REQUEST['category']) ? $_REQUEST['category'] : 0; EM_Object::ms_global_switch(); //in case in global tables mode of MultiSite, grabs main site categories, if not using MS global, nothing happens wp_dropdown_categories(array( 'exclude'=>'1,2,3,4', 'hide_empty' => 0, ')); EM_Object::ms_global_switch_back(); //if switched above, switch back } else { if ( is_page('business')) { wp_dropdown_categories(array( 'exclude'=>'5,6,7,8', 'hide_empty' => 0, ); ....... } } ?> </div> <!-- END Category Search -->
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘multiple events-list pages with different search form categories’ is closed to new replies.