Results 1 to 2 of 2

Thread: Accessing data from a custom drop down field

  1. #1
    Thread Starter
    lucrothe's Avatar
    Join Date
    Apr 2010
    Location
    United States
    Posts
    91
    Thanks
    18
    Thanked 13 Times in 7 Posts

    Accessing data from a custom drop down field

    Hello,

    I'm having a problem getting a drop down menu to work and I was wondering if someone could help me out.

    I have a custom drop down field called 'cp_cat' with options of 'yes' and 'no'.

    The value is set to yes but when I view the post it is showing no. Here is the code:

    Code:
    <?php if (get_post_meta($post->ID, 'cp_cat', true ))
    if($value == 'yes') {
    		echo 'yes';
    	} 
    else {
    		echo 'no';
    	}
    
    ?>
    Any suggestions?

  2. #2
    Thread Starter
    lucrothe's Avatar
    Join Date
    Apr 2010
    Location
    United States
    Posts
    91
    Thanks
    18
    Thanked 13 Times in 7 Posts

    Re: Accessing data from a custom drop down field

    You must be an AppThemes customer and logged in to view this response. Join today!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)