Post meta is a data set containing additional core as well as custom post information.

learn more… | top users | synonyms

0
votes
2answers
299 views

Query posts WITHOUT a custom meta field

I'm trying to build a custom query that will return all posts that DON'T have the associated post meta. I'm not quite sure how to do this...here is what I am working with, and for your reference ...
1
vote
0answers
191 views

Setting Required Fields When Writing a Post [duplicate]

Possible Duplicate: don't publish custom post type post if a meta data field isn't valid I originally asked this Q over at theme hybrid, Justin suggested I ask in here, he suggested ...
3
votes
1answer
5k views

Is it possible to store arrays in a custom field?

If I understand correctly, custom fields work like this: key(string/int) => value(string/int) Is it possible to define a custom field like this? key(string/int) => value(array (string/int, ...
1
vote
6answers
863 views

trying to do if post meta !=0

im trying to do a simple if function on my code but for some reason it just isnt working correctly, ive gone over it several times to see if there is anything im missing but no luck, im trying to say ...
0
votes
1answer
68 views

Displaying the 'time ago' for recent activity within a post/custom post type?

How to get the 'freshness' of a post? (when it was last updated or commented and by who?) e.g. 48 days / admin (avatar).
0
votes
1answer
418 views

If post custom meta data is not set, show normal state

I'm much of a php-noob but have this idea of a loop for my site. I have the idea behind it but maybe you have an idea how to put this into code: $customfield = get_specific_customfield if ...
0
votes
1answer
366 views

Can I access a post meta field before the loop?

If I call the following function (on a page template, e.g. page-home.php) before the loop, nothing is returned. If I call it during or after the loop, the expected values are returned. Is there a way ...
0
votes
1answer
1k views

add post meta front end edit

I'm trying to allow users to add meta values in my posts but it doesn't seem to be adding it in my front end post edit <!-- edit Post Form --> <div id="postbox"> <form ...
0
votes
1answer
3k views

Group Posts By Custom Meta Value: Date

I have a post with a custom meta value which is populated via a jQuery datepicker and it gets stored in the following format: yyyy/mm/dd - is there a way I can group all posts from the same day ...
-2
votes
1answer
3k views

query with custom field

I figured out with my jquery slider. Need to help (: my query is: <?php $the_query = new WP_Query('showposts=10&orderby=post_date&order=desc'); while ($the_query->have_posts()) : ...
7
votes
1answer
13k views

How to save an array with one metakey in postmeta?

I have an array saved in postmata, each array key become a metakey. I want to change the code to save the whole array with one metakey. How to do that? Thanks! $poddata = Array( 'pod_id' => ...
0
votes
2answers
194 views

How to query and update one colum in postmeta table?

I'm trying to make a popularity calculation for all posts, based on page view and date of creation. Initially, there's a default popularity value saved in postmeta. Every hour I want to recalculate ...
1
vote
3answers
2k views

Custom URl parameter

i have Wp blog that need to receive a custom paramter on category page for filter the posts like my rule. For example: http://mysite.com/category/teste?myvar=ABC How can I get the myvar from ...
0
votes
1answer
294 views

Is there a way to only show Custom Meta Data on single posts from certain catagories

I am trying to use this code to display something in the 'single.php' file on the theme when the post is of a certian catagory. $cat = get_query_var('cat'); if ($cat == '4') { echo "post"; } else { ...
0
votes
2answers
53 views

custom filed from post in the side bar

I have a custom field in my post called fb_name. I need to be able to get that field name outside of the loop in my sidebar. How can I accomplish this?
1
vote
1answer
404 views

Display All Custom Post Fields and Values, Unless Empty

I am looking to grab all of the custom post meta fields for a given post and display them on the page which i have accomplished with the following code. However I would like to check if( !empty() ) ...
2
votes
1answer
1k views

wp_handle_upload error “Specified file failed upload test” but still creates attachment?

Having a bit of trouble with an image upload custom meta box. What happens is the uploaded image is created as an attachment but the wp_handle_upload seems to kick back the error "Specified file ...
1
vote
1answer
377 views

orderby in custom WP Query does not work

I have this query: $new = new WP_Query(array('post_type'=>'support','order'=>'DESC', 'meta_key'=>'post_views_count', 'orderby'=> 'meta_value_num', 'posts_per_page'=>'20')); the ...
0
votes
2answers
8k views

What is generating my meta og:description?

My site has Facebook social graph meta tags in its page: <meta property="og:title" content="First Look at Dwarves from The Hobbit"/> <meta property="og:description" content="Movie"/> ...
4
votes
1answer
110 views

Allow user to create instances of custom field

I have a custom field for a links page which takes a name and an URL and saves it in the post meta. However, I want the user to be able to click "Add new link" and a new custom box appears so they can ...
2
votes
2answers
502 views

Wordpress Action Hooks and Post ID?

I'm creating a very basic Wordpress plugin whose purpose is to display a numerical value beside each post. My Logic for the plugin function (plugin.php) is this: <?php function foo($post_id){ ...
1
vote
2answers
4k views

Returning multiple get_post_meta values

I am looking for a solution to returning multiple get_post_meta values... Current I am using a meta box array as follows: $meta_boxes[] = array( 'id' => 'setlist', 'title' => 'Setlist ...
2
votes
2answers
2k views

I can't set meta_key in my custom post type query

I've created a custom post, events, and saved the meta data event_year to each event. I'm trying to get a year's event archive. When I go the the following URL, the meta_key and meta_value are not ...
0
votes
1answer
259 views

$_GET & $post_ID

I got a set of meta boxes containing different form fields. All of them are build inside a set of classes. Now I have the problem that I have to hook the construction of the fields early enough to ...
2
votes
1answer
808 views

Custom Post Type: Set post_title equal to a custom post type field

I’ve created a custom post type for employees in a company with some fields they have to fill (like E-mail, phone, etc.) and a select box which takes some values from another custom post type called ...
0
votes
1answer
663 views

How can I sort my loop based on meta data, using a form?

I've created a custom post type called 'properties' with custom meta boxes of 'price' and 'rooms'. I have a custom loop-property-archive.php to display the properties. What I would love to have is a ...
2
votes
1answer
187 views

Multi-line captions on attachments

How can I change the 'Caption' text input to text area, to allow for multi line captions on media uploads?
0
votes
1answer
81 views

wordpress multi user question

The blog I'm implementing will have more than one user (different analysts) but there will be only one user (call it the publisher user) who will be checking through the posts and uploading them for ...
2
votes
1answer
189 views

Post IDs missing on delete_postmeta action hook

I'm using metadata in pages to store variables and do server side caching for dynamic generated PayPal buttons and other variables about the pages (page specific). I'm trying to hook the page meta ...
0
votes
1answer
571 views

search serialised meta_value for date value?

i've saved and array of 'open days' as a serialised array in a meta value. I was hoping i could then just search this field for the selected dates but i can't seem to create a match. serialised = ...
1
vote
2answers
78 views

need advice on how to do a lists using custom post types - taxonomy vs postmeta

i am building a lists plugin .... i want to have a custom post type "lists" and then obviously also there would be a number of list items for each list .... i have read a fair bit of stuff about ...
5
votes
1answer
2k views

The “_encloseme” Meta-Key Conundrum

While working with metaboxes / custom fields I've seemed to indirectly create many of these _encloseme meta_keys all over my wp_postmeta. Seen here: So far no problems have arisen from this and ...
0
votes
1answer
218 views

Why values dont shows in custom post column?

I have some trouble. /* Catalog */ function my_post_type_catalog() { register_post_type( 'catalog', array( 'label' => __('Catalog'), 'public' ...
4
votes
1answer
293 views

What is the most secure way to store post meta data in WP?

Sony's recent security "holes" showed how unsafe it can be to store data unencrypted. As some of you may know, I 'm working on re-releasing the free CRM theme Driftwood. What is the most secure way ...
0
votes
3answers
960 views

Sort taxonomy page alphabetically by meta rather than default post date

The user starts at a page showing posts of custom post type, "agent". Each post displayed shows a region/custom taxonomy it belongs to and links to a page that shows all posts in the region the user ...
3
votes
1answer
1k views

How to programmatically create a connection with [Plugin: Posts 2 Posts] on cpt publish?

How can I programmatically create a connection between one custom post type, cpt, (with post id known) to another on cpt on publish? I am using VoodooPress's front-end posting method to publish a ...
2
votes
2answers
339 views

Single reusable value for post meta: Custom Taxonomy or Post Meta?

Suppose I have a post meta like "Region" it will contain values like "Region 1", "Region 2" etc. But it should only contain ONE value. Also I would like it to have an archive page. If I use custom ...
-1
votes
2answers
357 views

wrap text around custom fields array

I'm using this code here to grab all my custom fields from a post for use in an gallery array. http://www.kevinleary.net/get-all-custom-fields-attached-post-page-post-type/ function: // Get all ...
3
votes
1answer
1k views

importing data from non-wordpress mysql db

I have created an import file to get the articles from a non-wordpress db and bring them in as posts in wordpress, I am not sure how to bring over the thumbnail image into my custom field I defined as ...
1
vote
1answer
205 views

Metadata Query when storing data as array possible?

Suppose I store all my post meta data in an array like $meta = array( 'img' => '', 'caption' => '' ); update_post_meta($post->ID, 'theme_banner', $meta); Can I query posts where ...
1
vote
1answer
426 views

Is there a need for nonce with Post Metabox?

I looking at the docs for add_meta_box. They used a nonce. wp_nonce_field( plugin_basename( __FILE__ ), 'myplugin_noncename' ); I am wondering, probably the save post form itself should already ...
1
vote
1answer
2k views

How to store post meta in an array?

What is the best way to store post meta in an array (using a custom write box, know how to do that) so that all post meta is in a single custom field?
0
votes
2answers
84 views

Is there a way combine posts meta_name?

I want to know if there is a way that 2 different custom fields that have basicly the same value function to be combined. 1) meta_name: my_link and meta_value: a link 2) meta_name: other_link and ...
0
votes
1answer
1k views

Is there a way to exclude posts based on meta_values?

I have a need to exclude posts based on a custom field type. It will probably be a field such as "legacy" or "depricated". I searched for an example on how this would be done but I haven't found ...
0
votes
1answer
634 views

Let's Create Custom Field Template Documentation

I've been using the Custom Field Template plugin for a while now, and I really like it. It's fantastic for adding quick custom field meta boxes in the wordpress back end. It handles TinyMCE, file ...
3
votes
1answer
738 views

Meta keywords and descriptions plugin for manually editing meta for each page/post

Can anyone recommend a simple plugin that allows me to add/edit meta tags for keywords and description on each page of my wordpress site? Just something that adds the fields to the page editor would ...
1
vote
2answers
351 views

conditional function to change post-meta background image

I have this CSS setup for my blog posts meta information. But there are certain categories where I would like to use another image in the same spot and not display the meta information. I'm not quite ...
0
votes
2answers
432 views

post meta - problem : copy the same meta for all the articles

i created a post meta, to add the name of a specific "author" to my articles. But if i enter the meta of the first article, all the other articles copy the same meta. If i enter then a second name in ...
0
votes
2answers
2k views

How to test the outcome of a wpdb query?

I want to get all the data with the meta key of "project_id" from post meta table. I wrote a query, it should work in thoery, but I have no way to see what I get, and inject this query to my plugin ...
-1
votes
1answer
300 views

How to get all the related ids without array?

I want to get all the post ids when the post meta includes a key of "project_id". This function get the job down, but need refine: function get_all_ids(){ global $wpdb, $post; $meta_key1 = ...