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

learn more… | top users | synonyms

1
vote
2answers
187 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 ...
1
vote
1answer
157 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 ...
1
vote
2answers
4k 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 ...
1
vote
0answers
78 views

How to save double quotes in post meta, when the post meta data is an array? [closed]

Ok so I've been scratching my head on this one for a while. I'm making a plugin that adds a custom meta box to a custom post type. I'm using the update_post_meta function to save the data from the ...
1
vote
1answer
26 views

Meta function issue

Taking a clue from older WordPress stock themes I created a meta function to display information about each post. function my_entry_meta() { // Translators: used between list items, there is a space ...
1
vote
0answers
57 views

Custom RSS Feeds & Post Meta Data

Rss feeds normally display media files along with post excerpts. I am using post meta to add media files to a post. Unfortunately, since the audio file is not being inserted into the main textarea the ...
1
vote
1answer
42 views

Permalink structure with $_SESSION variables

I have a project that has content being filtered throughout the site (many custom WP_QUERY calls). Originally there was no URL needs, just filtering by $_SESSION variable. Works perfectly, but NOW ...
1
vote
1answer
50 views

echo a specific meta_key queried through a custom post

I'm new to coding but love tinkering around (on Virtual Server) with bits to upgrade my current website when I have the time. What would be really useful to me would be to post an individual ...
1
vote
1answer
42 views

Calling Different Custom Post Timestamps in a table

I use WordPress to run an events site that people can sign down to if they have a subscription. At the bottom of each event, if you are admin you can see a guest list with Name, Email, Tel, Avatar ...
1
vote
1answer
848 views

advanced custom fields update_field for field type: Taxonomy

I need to insert a post via wp_insert_post and then add relevant post_meta - however, the WP admin has been customized with the excellent ACF. I know I can add_post_meta in this way: add_post_meta( ...
1
vote
1answer
652 views

Get all posts from custom post type and insert in select input as metabox

I would like to know if its possible to do something like this. I have Slider custom post type and Services custom post type. For slider posts I have created a metabox for URL value to display next ...
1
vote
1answer
522 views

Create Multiple File Upload Metabox in Wordpress

I am trying to create a metabox to upload multiple files (can be images or files). Currently I have the upload field and its working file till the time we press upload and saving the data. The only ...
1
vote
0answers
59 views

Add Embed.ly API objects to post_meta on update

I created a new post type fr_news for adding news to a site. The user inputs a URL, and what I want it to do is use the Embed.ly API to display the news. I've got the API side figured out. Here's the ...
1
vote
1answer
48 views

Is it possible to paste a link without tags and make it directly a link in a post?

So for example: if I post http://testeteststetetst.com, it won't make it a link if it's a post. If it's comment, it does make it a link... Now, I want it for posts too.. Is this possible, if so, how? ...
1
vote
1answer
173 views

Restrict post edit/delete based on user ID and custom field

I've been able to prevent deletion and editing of posts based on user ID and page ID however, I need to restrict access to editing and deleting based on a custom field. Not sure how to go about doing ...
1
vote
1answer
210 views

How to best delete orphan wp_postmeta

I'm in the middle of doing some fairly complex queries involving metadata from a custom post type. Unfortunately if any posts are deleted the metadata stays put which complicates matters as I am ...
1
vote
0answers
501 views

Custom WP_Query for WordPress Search Results with meta_query

I am using a custom query to generate my search results. The code I am using works perfectly without the meta_query variables in my arguments array. I am trying to compare multiple custom fields with ...
1
vote
0answers
96 views

Attach time/date stamp on add_post_meta

we have an image viewer on our website where admins can tag images thought ajax (new feature on Wordpress 3.0). We are tagging just fine, but we need to filter when they were tagged. We are using ...
1
vote
1answer
256 views

Filter list by a unique meta value dilemma

I'm been racking my head at this for a while now, and I can't figure out how to fix the code. Here's the issue; I found a snippet of code online to filter my post results in edit.php based on ...
1
vote
1answer
891 views

Displaying Meta Box Image

I have some problems displaying info from my custom meta box in my custom post type single. I'm using Reusable Custom Wordpress Meta Boxes by Tammy Hart. I'm able to display the textfields using ...
1
vote
1answer
223 views

get_posts in meta box dropdown not showing latest posts

I’ve got a metabox I set up using WPAlchemy that allows authors to add a link to an associated post. It’s been working fine for months but now for some reason the dropdown with the appropriate posts ...
1
vote
1answer
379 views

How do I sort a custom post type admin column using two meta keys?

I have created a custom post type along with custom columns. One of my columns displays a date range such as "12/05/2012 - 11:00 am to 12/15/2012 - 1:00 pm". This is a concatenated string using a ...
1
vote
1answer
83 views

Post meta not updating

I am trying to make a voting system for WordPress. This is my code in functions.php: add_action("wp_ajax_add_votes_options", "add_votes_options"); add_action("wp_ajax_nopriv_add_votes_options", ...
1
vote
1answer
144 views

Importing Data from a Non-WordPress database, into WP

I'm migrating data from a totally different database style into WP. The main issue I'm trying to wrap my head around is how to import any meta data, given that WP uses a key value pair style for meta ...
1
vote
1answer
39 views

Get a row from a separate table by matching a posts meta_key to a tables ID column

I am trying to match a posts meta_key value to a separate tables column ID and call that row/array in the single-listing.php. I have a meta_key value that is called dot_number. The table is called ...
1
vote
0answers
92 views

How to increase load time of an archive/search page (WP_Query)

I'm currently looking at why the archive and search pages take so long to use, and have found that the bulk of processing time is spent on the query_posts that is called before the template has even ...
1
vote
1answer
52 views

Cannot retrieve a custom RSS field from posts

The goal is to display a featured thumbnail micro thumb as a custom field in RSS. This is what I've done: //theme functions.php function rss_post_thumbnail($content) { global $post; ...
1
vote
1answer
77 views

Limits, not all post are showen when querying for posts by view count

I'm having some difficulty getting a loop that gives me post by most viewed. I started by following this tutorial ...
1
vote
1answer
180 views

Query posts by meta_key whose value is an array

Let's say I'm modifying the default posts query: add_filter( 'pre_get_posts', 'my_filter' ); function my_filter( $query ) { $query->set( 'meta_key', 'my_rating' ); $query->set( 'orderby', ...
1
vote
1answer
26 views

need to add add user names to the post for later retrieval or removal

I'm working on an unique feature, that requires that I add usernames to specific post. In detail, user clicks button and if he is logged in his wp username is saved somewhere together with the post. ...
1
vote
0answers
86 views

Function to update post_meta based on existing post_meta

I have a custom post type for addresses on a Google Map. One meta field is for the address, but I want to convert that address to longitude/latitude. So I have a meta field for longitude & one for ...
1
vote
0answers
221 views

Querying posts with meta value that begins with a certain pattern

I am trying to create a search filter using meta_query. The only problem I'm having now is that I can't compare with wildcards. I think that's how you word it? $keyword = 'sos'; $tlds = ...
1
vote
1answer
271 views

List Taxonomies: Don't list taxonomy if it has no post - depending on custom post-meta?

This might be complicated to explain and I don't know if there is a solution to that!? I have a custom-post-type named "wr_event" and a hierarchical custom-taxonomy named "event_type". The ...
1
vote
2answers
79 views

need some assistance with the checkboxes (selecting/deselecting featured posts)

I am working on a project which has a functionality of "featured_posts" based on this discussion. I have created a table which lists all the posts. I have a checkbox in each row which upon click ...
1
vote
1answer
383 views

Remove Post Custom Meta Box

I created a custom post type. When I click "Add new" for this post type, I see among other meta boxes a "Main Slider Item SEO" meta box. This SEO is superfluous. Can I remove it? add_action( ...
1
vote
0answers
298 views

Getting post meta data, while editing a post in wp-admin panel [closed]

is there any chance of getting post meta data while editing post in wp-admin? For example - $price = get_post_meta($post->ID, 'price', true); isn't working, and it won't return post meta data, ...
1
vote
0answers
735 views

$wpdb class updating meta_value using Ajax [closed]

I am trying to create a way to change the order of posts using a meta_key / meta_value that is updated using jQuery ui-sortable. I'm already using menu_order in the same way but need to create a way ...
1
vote
0answers
188 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 ...
1
vote
1answer
691 views

Custom wp_query time filter on meta_value

My goal is to only show posts with opening hours after business hours, for a given day. So, e.g. I have a (custom) post with following meta_key and meta_value: meta_key = 'monday, meta_value = '14:00 ...
0
votes
2answers
1k views

Custom query, multiple custom keys

I need to get posts that have two meta-values. It tried the following code, but this is getting empty result <?php $featuredquery = " SELECT wposts.* FROM $wpdb->posts wposts, ...
0
votes
2answers
780 views

Up/Down voting system for Wordpress

Looking in all posts with keywords "voting system, upvote, downvote", I can't find a satisfying solution for this issue, except accepting one of the available plugins, spend a lot of time undersanding ...
0
votes
2answers
2k 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 ...
0
votes
3answers
423 views

Uknown meta entries in wp_postmeta

I'm working on a site that has been running for few years and had different maintainers so it's kind of a mess. What I found weird is a lot of entries in wp_postmeta where all the keys are numeric and ...
0
votes
3answers
192 views

Using preg_replace to filter custom textarea

I am developing a custom post type, which, among others includes the possibility of sending an email from within the post editor. The email body textarea is populated through a custom settings page ...
0
votes
2answers
41 views

Wordpress for questions and responses website

I am using Wordpress to create a Q&A website. The question is returned by the_content. If I store the answers as post meta field array: { [1] => 'first answer', [2] => ...
0
votes
3answers
123 views

How to automate featured posts number? [duplicate]

Possible Duplicate: featuring old articles without messing up with the archive Let's say you have a category called "featured". and you use that to feature posts. And the theme you have has ...
0
votes
1answer
734 views

mySQL query. ORDER BY meta_key

I'm fighting this quite long already and start to think I'm missing something big. CPT posts could have or not metadata ( _vip_post [0|1], _thumbnail_id [null|numeric] ). If i query for ...
0
votes
2answers
249 views

Correctly delete posts with meta and attachments [duplicate]

I am having an overview of custom post types: http://www.citizen-science.at/wordpress/projekte/roadkill/ubersicht/ These have custom tax and also an attachment. In my overview I need to provide ...
0
votes
1answer
2k views

How to add multiple featured image in meta box in post editor?

I would like to add multiple featured image in meta box in post editor area apart from default available featured image. I have added the meta box but i have no idea on adding the featured image ...
0
votes
1answer
494 views

delete post meta by AJAX

I make meta box to delete a specific post meta key for the post by AJAX i make a button when click , delete the key from DB by AJAX add_meta_box('delete_test_key', 'delete test key', 'testdel', ...