• Resolved maxtrend

    (@maxtrend)


    I would like to customize the events-search.php template. I would like to put everything in one line of the search fields.
    I would like to create the template my-events-search.php end place it in \wp-content\themes\MYTHEMES\plugins\events-manager\templates\
    Vorrei richiamarlo tramite shortcodes: [event_my_search_form]

    Can you give me some help?
    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support angelo_nwl

    (@angelo_nwl)

    you can try em_locate_template(); for reference, please see events-manager/em-shortcode.php

    Thread Starter maxtrend

    (@maxtrend)

    /**
    * Creates a my form in home to search events with
    * @param array $atts
    * @return string
    */
    function em_get_event_search_form_shortcode_myhome( $args = array() ){
    return em_get_event_search_form_myhome( (array) $args );
    }
    add_shortcode ( ‘event_search_form_myhome’, ’em_get_event_search_form_shortcode_myhome’);

    /**
    * Outputs the event search my form.
    * @param array $args
    */
    function em_event_search_form_myhome($args = array()){
    $args = em_get_search_form_defaults($args);
    $args[‘ajax’] = isset($args[‘ajax’]) ? $args[‘ajax’]:(!defined(‘EM_AJAX’) || EM_AJAX );
    em_locate_template(‘templates/events-search-myhome.php’,true, array(‘args’=>$args));
    }
    /**
    * Retreives the event search my form.
    * @param array $args
    */
    function em_get_event_search_form_myhome( $args = array() ){
    ob_start();
    em_event_search_form_myhome($args);
    return ob_get_clean();
    }

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Custom search’ is closed to new replies.