if ($listing_type == 'pro')

Discussion in 'GeoCraft WordPress Theme' started by robertmylne, Jul 20, 2014.

  1. robertmylne

    robertmylne Member

    Joined:
    Mar 26, 2013
    Messages:
    49
    Likes Received:
    2
    This is to check if the listing is premium:
    if ($listing_type == 'pro')

    How do I check if the listing is "featured on the home page slider" or "featured on the category page slider". (if the check boxes are selected)

    Thank you.
     
  2. Gourav

    Gourav Support Staff

    Joined:
    Oct 19, 2012
    Messages:
    7,728
    Likes Received:
    207
    Hello,

    Following are the code for featured and category pages:

    $is_featured_home = get_post_meta($post->ID, 'geocraft_f_checkbox1', true);

    if($is_featured_home == 'on'){
    show one home page
    }

    $is_featured_cat = get_post_meta($post->ID, 'geocraft_f_checkbox2', true);

    if($is_featured_cat == 'on'){
    show one category page
    }



    Thanks & Regards
    Gourav Shrivastava
     

Share This Page