0
votes
1answer
18 views

Show value of select dropdown in meta box

I have created a meta box which has a select dropdown list and i want to show it in the post as a user selects a particular option from meta box.I cant figure it out how its done.Here is my meta box ...
0
votes
0answers
20 views

how to echo/display the custom field value in specific custom field name?

I have tried this code: <?php query_posts(array( 'meta_key' => 'custom_cat', 'meta_value' => 'creative', 'post_type' => 'page' )); ...
0
votes
0answers
31 views

Multiple meta data one label

I am wanting one label but multiple data to be under the label. I also want to reference each input option individually so that I can query for specific meta data. Currently I have, function ...
0
votes
1answer
26 views

get_post_meta() empty in preview WHEN custom post is published

So my client managed to find some (bug?), when custom post is published and he previews post all information what is posted with custom meta boxes is inaccessible. When I started debugging I found ...
0
votes
0answers
39 views

How to save dynamically generated value in post type?

I'm trying to use the count of the amount of people that register a post id to a table in the DB. I want to save this COUNT value to the post_meta so when I display the list of posts it can also show ...
0
votes
1answer
27 views

Can't Output get_post_meta?

I have a custom field for my post and I am trying to output it onto my post's page but nothing appears. I know my code works otherwise if instead of trying to call my custom field, I use a fixed ...
0
votes
1answer
212 views

Dynamically get the meta key value of a menu item based on it's post ID

I have a menu, that I need to insert an image that have it's path saved in a meta key (_menu_item_img) and associated with a post ID, every menu entry has it's own image, and I need to grab it ...
0
votes
3answers
136 views

How to Echo Metadata Value in Currency Format

I have a Custom Post Type with a Metabox and an input Text field for adding "Price" to the posts. Now I would like to display the input value which can be like 49 or 59 like 49.00 or 59.00 so far I ...
0
votes
2answers
209 views

Trying to get property of non-object error using get_post_meta()

I made a simple function for post_meta, in functions.php: // Top Sub Heading (top_sub) FROM CUSTOM FIELD function topSub( $Trunckvalue = null ) { global $post; $TopSub = get_post_meta( ...
0
votes
1answer
78 views

Display Post Meta in Header

I'm trying to get page post meta in my header so I can set some meta tags. I tried to get the global post variable but it only return true. <?php global $post; global $wp_query; echo ...
0
votes
0answers
93 views

Custom Field: Display only if a specific key is selected outside the loop

I might be doing this all wrong. I have a custom field called "enable_adsense" and the value can be either "yes" or "no" What I'm trying to do is display something if the value is "yes" and something ...
0
votes
0answers
48 views

Displaying additional meta from a custom post type on the page?

I have added the custom field which displays in the custom post type "portfolio" just fine. // Add more custom field function woo_metaboxes_add($woo_metaboxes) { // Check for post type = ...
0
votes
1answer
100 views

how to fire join query with post_meta

I have print sql query that runs within 'posts_where' filter and its like: SELECT wp_posts.* FROM wp_posts WHERE 1=1 AND wp_posts.post_type = 'shop_order' AND post_date >= '2013-08-26' AND ...
1
vote
5answers
1k views

Get meta_id along with meta_key and meta_value

Is it somehow possible to get_post_meta or get_post_custom and have meta_id returned along with the meta_value? For example: $data = get_post_meta( $post_id, 'my_key' ); // returns this: array( 0 ...
0
votes
1answer
426 views

Post meta select input, if statement

I have created a meta box with a select input (drop down menu). It has a few values and I want to display different content depends on which value the user selects. I am just unsure how to display ...
0
votes
2answers
262 views

how to get a list of meta data fields assocaited with a custom post type

I am using a theme which has defined a custom post type-- Now, I am trying to retrieve the list of metadata fields used by that post type-- so that I can insert data via PHP code in form of that ...
1
vote
2answers
1k views

display specific custom fields

I have few custom field assigned for each post, like: "Club" with value "club1" "Date" with value "date1" and so on... Now, I want to display from all the custom fields just those 2 " club" and ...
0
votes
1answer
140 views

Function to return values from metabox

I have created two custom metaboxes using the Meta Box plugin for my cpt called books, and I am confused how to output the values. The values need to be used in sperate places in one of my templates. ...
0
votes
1answer
1k views

get_post_meta - get a single value

When I do get_post_meta($post->ID, "company_wp_box_g", false) I am getting back an array of key/values pairs. array (size=1) 0 => array (size=7) 'f_name' => string ...
0
votes
1answer
268 views

Run a check for multiple meta key values

I am having a heck of a time getting wordpress to display all values of a certain meta key correctly. I wonder if I am going about this the wrong way? My end goal is to run a check to see if there ...
0
votes
1answer
228 views

getting the post_id from the post_meta

I need to find out the post_id of a post_meta record where the custom key is 'XYZ' and the is 'ABC'? Is there an API for that? Or do I need to run a regular select SQL with wpdb class?
0
votes
1answer
3k views

Retrieving multiple values to the Post Meta (using an array)

I'm having a problem retrieving post_meta values that I have stored in an array. I use this for storing the array: add_action( 'comment_post', 'add_food', 1 ); function add_food(){ global $post; ...
0
votes
1answer
843 views

wordpress get_post_meta / the_meta to output custom field value

What I'm trying to do is quite simple: I want to add a custom field named 'Button' to each post that will show a button (image) on the page with the value as its link. It's basically a button that ...
0
votes
2answers
612 views

Echo 2 values from one key in Array with get_post_custom

Edit 12/15/2011 Added Radio Button print code // Add meta boxes to admin panel only needs to be added once add_action('admin_menu', 'plib_add_box'); //Add meta boxes to post types ...
0
votes
1answer
229 views

Get author total post votes from post meta

In author.php, i have the list with the posts written by the author. I'm trying to get the total number of votes, from the author posts. All posts have a post_meta with a numbered value. i need to ...
0
votes
2answers
2k views

Unable to set Custom “Link URL” for Featured Image, and More?

I have an issue that I believe can be solved one of two ways. I am using Featured Images in posts for content on a home page slider. What I would like to have happen is to have the destination links ...