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

learn more… | top users | synonyms

7
votes
1answer
2k views

Best way to programmatically remove a category/term from a post

I am working on a script to convert all posts in a given category to use a postmeta flag instead (testing of MySQL has shown me that on a site as large as mine this will lead to a meaningful decrease ...
0
votes
1answer
684 views

How should I use posts_where to change meta_value from a string to integer?

How should I use posts_where to change meta_value from a string to integer?
1
vote
1answer
2k views

meta_compare seems to be treating values as strings instead of integers as expected

Trying to use meta_compare as suggested in the codex: query_posts('meta_key=miles&meta_compare=<=&meta_value=22'); Here is my code: global $wp_query; query_posts( array_merge( ...
2
votes
2answers
756 views

Conditionally Query Custom Post Types by Post Meta for Blog Home Page?

(Moderator's note: The question's original title was: "Custom query: Show custom post types plus custom post type with post meta on blog homepage") I'm in need of help with a custom query. I have ...
1
vote
2answers
192 views

How to find time last viewed?

I want to run an update script on pages that haven't been viewed and updated within X days. I'm using post meta to cache some related RSS feed data, and I want it updated once a week or two, but only ...
0
votes
1answer
389 views

How can I display a drop-down select of Post Names

I would like to add a custom write panel to a custom post type. I'm looking at the the code here: http://wefunction.com/2009/10/revisited-creating-custom-write-panels-in-wordpress/ I can get the ...
0
votes
4answers
192 views

Finding the page id

I'm not sure if I'm blind here, but short of digging directly into the database tables, where would I find the database id for a post or a page?
1
vote
1answer
172 views

Routine to convert custom post meta from old to new value

I have two custom post meta objects that have been applied to all pages and posts in my sites. The names are MyCustomHeader and MyCustomTitle and I have one of these assigned to each post and page in ...
0
votes
1answer
841 views

Custom query with query_posts doesn't show post without certain meta_key

I'm using query_posts to sort order certain categories. My code look like this: query_posts('category_name=abs&orderby=meta_value_num&meta_key=field_ordering&order=DESC'); This does ...
1
vote
2answers
5k views

Strategy to get post meta for use outside the loop

I need to know solutions for the question above. There are cases, when we need post meta information outside the loop. Let's say, I'm developing theme that will display ads from certain vendor on that ...
3
votes
3answers
1k views

How to create a mini directory in WordPress?

I'm looking to create a simple directory, something similar but not so powerful as SOBI2 for Joomla. Is there something like this for Wordpress? I want to store informations like: Name URL Address ...