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

learn more… | top users | synonyms

3
votes
1answer
707 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
400 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
299 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 = ...
0
votes
2answers
2k views

how to get all post with the same post meta?

some of my posts have the post meta of "project_id". How can I retrive all the posts which have the meta key of "project_id" ? I tried: $meta_key = 'project_id'; return ...
0
votes
1answer
589 views

Parse a text area custom meta box and assign as value to existing meta keys

I built a post interface to accept specific data in the form of custom meta boxes [rant]but now the end user says it's too much work to cut and paste 4 times[/rant]. So now (completely out of ...
0
votes
3answers
2k views

troubles with get_post_meta (and saving it)

im having trouble using "add post meta" and "get post meta" : i have a new meta box in my taxonomy : i always have the value "empty meta" inside the input field, even after i enter anything : like ...
4
votes
1answer
13k views

How to extract data from a post meta serialized array?

I found an XML to WP decoder script that stores the data as an array in a custom meta field. What is the best way to extract the information? For example how could I display the "Manufactured in" ...
0
votes
1answer
615 views

How to remove date from showing in meta description

When my results show in Google for the respective keywords, in the meta description I see the date as well. Is there a way to remove the date? Example meta description shows up as: 15 Jun 2009 ... ...
1
vote
2answers
740 views

delete post meta from db, even if does not exist?

it is not the first i see that we "delete" a post meta even if it does not exist : example : $count = get_post_meta($postID, $count_key, true); if($count==''){ $count = 0; ...
0
votes
1answer
145 views

How to obtain a group of post meta and assign each meta to other variables?

I saved a group of data in post meta, now I need to get the meta and use them as other items. My code not working, please help me correct it, thanks! $boxes = Array( 'height', 'width' ); foreach ( ...
1
vote
1answer
394 views

Populate Custom Fields in a Custom Post Type?

I want to set up a basic 'post rating' system for my site - I don't want to use a plugin - so I want to add the custom field 'rating' to each new custom post and populate this field with the number 1. ...
9
votes
3answers
13k views

Attaching taxonomy data to post with wp_insert_post

I am trying to implement a front end posting system which shows taxonomy data in several dropdown select fields. Each of the dropdowns is named by using the "name" $arg in wp_dropdown_categories(). ...
0
votes
2answers
2k views

adding a URL to a post meta

OK, a pretty dorky question, but I am new to PHP so bear with me. How would I add an a href link to the code below so the custom meta field is linked on the front-end? <?php ...
10
votes
2answers
11k views

How to hook update_post_meta and delete_post_meta?

I'm still struggling to get my head around this whole hooking into things, so I'm really stuck on trying to do the following task: If update_post_meta is fired then check to see if the meta_key is ...
1
vote
1answer
152 views

How to use post_id with a Class?

I made a plugin for some calculation. Class Math { var $id; // I want to map this id to post_id var $a; var $b; var $c; function calculate{ $this->a = $value_from_post_meta_input_box; ...
2
votes
2answers
812 views

Display all custom post type posts and order them by an optional meta_key

I have a custom post type (CPT) called property. I have registered a featured property metaboxfor it as explained in this question "How do I create a featured post within a custom post type?". So a ...
1
vote
2answers
7k views

How to sort by meta value?

How can I sort by meta value? In meta value I have "price" (float). I make this query, but always get Sorry, no posts matched your criteria. $posts = query_posts( $query_string . ...
0
votes
1answer
438 views

Add box with custom per-page properties

Hey, I'm stuck trying to add a box with settings for all pages (the ones users create/edit). What I'm attempting to do is add 6, 7 check boxes and an input field for all pages that alters the ...
12
votes
4answers
8k views

Passing error/warning messages from a meta box to “admin_notices”

I have a simple meta box that updates the post custom fields (using update_post_meta()). How can I send a error or warning message to the next page after the user publishes/updates the post and ...
2
votes
1answer
515 views

List posts under meta_value heading

I need to list completed (meta_value) projects for each year (meta_value), like this: 2006 - Project 1 - Project 2 ... 2005 - Project 3 ... I found (here) a great piece of code to deal with I'm ...
0
votes
1answer
1k views

meta box & callback function

Situation I got a class where i add a meta box to the post edit screen. EDIT: This is the working version now /** * Calls the class on the post edit screen */ function call_someClass() { ...
7
votes
2answers
3k views

post formats - how to switch meta boxes when changing format?

Problem After realizing that post formats are pretty popular, but only a extremly rough drawn concept, i see that users will run into possible traps. Post format ... uses post meta fields & ...
0
votes
1answer
216 views

Help with Post Meta

This snippet pulls in post "industry" for the current post $post_meta = get_post_meta( $post->ID ); This code pulls in all the logos for the "brands" <?php query_posts( ...
3
votes
1answer
748 views

How to enable users to down-vote in this simple voting counter (that uses the post meta)?

This simple tutorial teaches you how to make a voting counter using the post's meta data. I would like to know how to add down-votes to this small script (e.g. -1, -2). In the following way: If the ...
4
votes
1answer
3k views

meta_query: using BETWEEN with floats and/or casting to DECIMAL

Each post has a lat/lng value attached to it via postmeta. I'm trying to grab all posts within a bounding lat/lng value. Here's the get_posts query: $posts = get_posts(array( 'posts_per_page' ...
2
votes
2answers
606 views

Trigger “unsaved changes” dialog for custom post meta changes

I'm using a custom post type with custom meta fields, but autosave and the "unsaved changes" dialog don't seem to be triggered for these custom meta fields. Autosave isn't as important to me as the ...
3
votes
2answers
4k views

How to delete outdated, wrongly sized images in _wp_attachment_metadata?

I've got several custom image sizes for my blog. One of these is setup as add_image_size( 'slide', 640, 290, true );. These are used in a header slideshow. My problem is I've upped the dimensions of ...
0
votes
2answers
793 views

Remove “%” from strings in serialized arrays in wp_postmeta

In the course of converting a blog from Blogger to WP and running a script to grab hot-linked images for hosting, I ended up with some funky images names like act%252Bapandas-210x290.png These ...
0
votes
1answer
2k views

Metadata in loops

I have a standard Wordpress loop displaying items: $loop = new WP_Query( array( 'post_type' => 'images', 'orderby' => 'menu_order', ) ); while ...
0
votes
1answer
6k views

Getting metabox value?

I have a custom metabox made using the code from Wordpress Reference: http://codex.wordpress.org/Function_Reference/add_meta_box <?php /* Define the custom box */ // WP 3.0+ // ...
1
vote
2answers
3k views

Wordpress Orderby Numeric Value Not Working

I am trying to get all products from the wpsc-product post type and then display them by a custom meta field called release_date_year. However, it doesn't appear to be ordering my posts by this custom ...
9
votes
3answers
9k views

Order by meta value or date?

Got a custom field called startDate but its only on a few events. I was wondering if it isn't set for a post I could use post_date to generate the posts list? // if meta_key _postmeta.startDate isn't ...
0
votes
2answers
3k views

Wordpress wp_head() crap

I know, wp_head() is important, but it inject so much crap into the header, i like to get it out... and just add manually the 2-3 line of code i need.. BUT, and there is always a but, i need the ...
1
vote
2answers
2k views

post meta data clearing on autosave

For starters I am using this GREAT answer to achieve custom post types as well as a custom way to insert those post types into other pages, you can view that answer here: Custom field/meta populated ...
0
votes
1answer
612 views

How can I modify RSS item titles to be either the title or a custom meta field?

I'd like to optionally replace some RSS item titles with a headline meta field I've added to certain post types. I have the post types showing up in the feed using: function myfeed_request($qv) { ...
15
votes
4answers
13k views

what is the correct way to compare dates in a WP query_posts meta_query

I have a query_posts call in a WP template. Through the use of the More Fields Plugin I can give the site admin the ability to create an event (custom post type) and then enter a date which is ...
1
vote
3answers
320 views

Grossly inefficient wordpress loops!

I'm working on a site at the moment for an orchestra. The various members need to be listed, according to their instrument. The members have a custom post type of biography and I'm capturing the ...
14
votes
5answers
26k views

How can I show posts only if meta_value is not empty

Three people have already tried to solve this, and we're coming up nil. I want to show only posts that have a value in the meta_key 'featured_image'. So... if 'featured_image' is not empty, show the ...
0
votes
1answer
800 views

get_post_meta of multiple posts?

I'm trying to get the key values for multiple posts with get_post_meta but am having no luck so far. In short, I have a function that adds 'votes' and 'thevoters' to each post. I want to check to make ...
2
votes
2answers
5k views

How to store multiple input values with same meta_key

is there a way to store the input value from multiple custom meta box fields with the same meta_key? I use the following code to store ONE value for the meta_key 'startdate': function startdate() { ...
0
votes
2answers
1k views

WordPress MS wp-admin/includes/post.php error with shortcode generator

I'm having a serious issue with Wordpress 3.1 with Multi Site enabled and my themes custom shortcode generator. For some reason, I'm getting the following error whenever I create a new ...
2
votes
2answers
767 views

Using date stored as custom field to filter posts displayed in admin

This seems like a fairly common problem, but I'm posting this as I've yet to find a solution to my problem here on WP Answers - any help is HUGELY appreciated! Ok - so I have a custom post type of ...
0
votes
1answer
2k views

get all posts with certain meta data

I'm developing a plugin made on the original calendar. My wordpress is based on real events and I want to keep trace of theme on the calendar. So I added a custom field in the post which is the end ...
0
votes
1answer
860 views

get_post_meta printing empty fields, but it shouldn't be

I'm trying to call some hidden custom fields into a meta box. The custom fields are the same - a maximum of five named _link and five named _url, with sequential numbers following (eg _link3). ...
1
vote
2answers
2k views

Filtering multiple meta_values

I'm trying to create a filter using two meta_values. Example. If the current page has meta values red and blue, only display queried pages that have both red and blue and none that have just red or ...
1
vote
1answer
213 views

Post image in WordPress not appearing on home page

I just installed WordPress and I'm trying to set a image to every post I have. I did this: Custom fields ----name: paddimage-gallery --value: URL of image. I go to my home page and it does not ...
0
votes
1answer
190 views

Custom Meta Data is not being saved

I have created a custom meta box using following link in wordpress 3.0: http://farinspace.com/how-to-create-custom-wordpress-meta-box/ I am using same code and custom meta data is not being saved. I ...
14
votes
4answers
32k views

WP insert post PHP function and Custom Fields

The WordPress function is used for submitting data programatically. Standard fields to submit to incude the content, excerpt, title, date and many more. What there is no documentation for is how to ...