Custom Filter

Tagged: 

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

These forums are closed to new replies / tickets. Please open a support ticket from our new Support page.

  • Author
    Posts
  • #3325
    Jose Rodriguez
    Spectator

    Hello. Sorry if this question is to basic but i can’t found the way…
    I create this on my meta-boxes to try to do several filters

    function my_add_meta_box_epl_listings_callback($meta_fields) {
    $custom_field = array(
    ‘id’ => ‘epl-property-listing-custom-data-id’,
    ‘label’ => __(‘VS International Custom Setup’, ‘epl’),
    ‘post_type’ => array(‘property’),
    ‘context’ => ‘normal’,
    ‘priority’ => ‘default’,
    ‘groups’ => array(
    array(
    ‘id’ => ‘inversion’,
    ‘columns’ => ‘1’,
    ‘label’ => ‘Donde se mostrara el listing’,
    ‘fields’ => array(
    array(
    ‘name’ => ‘home-pag’,
    ‘label’ => __(‘En el Home Page?’, ‘epl’),
    ‘type’ => ‘radio’,
    ‘opts’ => array(
    ‘yes’ => __(‘Yes’, ‘epl’),
    ‘no’ => __(‘No’, ‘epl’)
    ),
    ),
    array(
    ‘name’ => ‘inversionista’,
    ‘label’ => __(‘Es una propiedad de inversion?’, ‘epl’),
    ‘type’ => ‘radio’,
    ‘opts’ => array(
    ‘yes’ => __(‘Yes’, ‘epl’),
    ‘no’ => __(‘No’, ‘epl’)
    ),
    ),
    array(
    ‘name’ => ‘Nueva’,
    ‘label’ => __(‘Es una propiedad de Nueva?’, ‘epl’),
    ‘type’ => ‘radio’,
    ‘opts’ => array(
    ‘yes’ => __(‘Yes’, ‘epl’),
    ‘no’ => __(‘No’, ‘epl’)
    ),
    )
    )
    )
    )
    );
    $meta_fields[] = $custom_field;
    return $meta_fields;
    }
    add_filter( ‘epl_listing_meta_boxes’ , ‘my_add_meta_box_epl_listings_callback’ );

    It’s working fine on the backend but i can’t create a [listing_category] to show for example all the properties where “nueva” its Yes

    #3377
    Merv Barrett
    Keymaster

    You will need to now add code to output your new fields onto the template

These forums are closed to new replies / tickets. Please open a support ticket from our new Support page.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Basic Support’ is closed to new topics and replies.