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

learn more… | top users | synonyms

1
vote
1answer
47 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
115 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
2answers
2k views

How do I use wp_query for WordPress search?

I would like to create a custom search form to search posts based on the values of about 4 custom fields. I tried using wp_query to achieve this but so far my biggest problem is that the I don't get ...
0
votes
2answers
109 views

Query posts by searching for a string in a meta field

I'm trying to see if I can make this happen with the built-in meta_query function. I'm taking a $_GET variable and want to return posts that contain that string inside the meta_key urls. So far, the ...
0
votes
1answer
71 views

Group posts by meta_key

I have a Problem with grouping meta_values. The Query looks for posts with the meta key "company". I want a unique listing of the colors like: blue red yellow array_unique was not successful and also ...
0
votes
1answer
38 views

Publish and save specific postmeta to a filtered post_type

I have multiple plugins with different post_type(s). When I save or publish, all of the custom_post_meta that belong to one specific post_type are also saving. I'd like to filter by post_type so ...
0
votes
1answer
224 views

Move Title and the Content WYSIWYG editor position

Right now, the Title is the first thing at the top of the page, then we have next the WYSIWYG Editor. I would like to add a Custom Meta Box and insert it before the title or WYSIWYG editor. How can ...
0
votes
0answers
157 views

Sort users by custom user meta value

I'm trying to sort users by a custom meta value "user_business" which is their business name that way when users are listed they're sorted alphabetically by their business name as they should be. I'm ...
1
vote
1answer
45 views

How can I sort homepage by a meta value?

I am trying to sort my home page posts by a custom meta value. I've been told I should use pre_get_posts but I seem to not be implementing it correctly. This is what I am doing: ...
4
votes
1answer
742 views

Update all posts automatically when using post_meta

I recently created a new site using wordpress but I'm a rookie - everything I know is trial and error with no formal training. So please, please, please keep your answers as simple as possible. Thanks ...
0
votes
2answers
33 views

Have lots of meta for posts, is it better to get at all at once or each individually

I have a directory website and am doing a bit of a redesign/restructure. I have quite a few meta fields for each entry, i.e. address, city, country, website, where to buy their products, social links, ...
0
votes
0answers
78 views

How to create a custom field index page

I'm trying to create an index page for some custom fields, just like the taxonomy search pages. E.g. I have a custom field with slug=wpcf-delivery. I want an index page that lists all values where ...
0
votes
1answer
51 views

remove a single post_meta

I created a plugin that has multiple meta boxes. One meta box saves a single record by using update_post_meta(). Another meta box saves multiple record by using add_post_meta(). I do not have ...
1
vote
2answers
1k views

Export entries and multiple custom field meta to .csv?

First time poster. I'm trying to export a bunch of custom posts out to a csv file so I can easily import them into a new database. I've ran the native export to xml, but it's not the correct format I ...
0
votes
1answer
320 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
0answers
44 views

get_post_meta no longer working

I am trying to use get_post_meta to return a value from the post meta, it was working completely fine then suddenly stopped working. I've tried and checked everything and i cannot seem to get it ...
0
votes
0answers
15 views

How to bulk update META Data in posts [duplicate]

I have almost 50,000 posts in my wordpress website. I have never written the META Title, META Description and META Keywords. Now I need to write them for SEO purpose. How can I do it easily in the ...
0
votes
0answers
242 views

Sort Custom Post Type List Table in Admin by Multiple Meta Values

I have a Custom Post Type (CPT) called Sessions. The List Table in the admin for this Custom Post Type (CPT) has the following columns: Session # (post id) Session (post title) Day (CPT meta value) ...
0
votes
1answer
97 views

How to validate select field in post meta?

I want to display a select dropdown field in the post meta. How can I validate the input before saving it? Currently, I am simply saving without validating like this: if ( isset( ...
1
vote
1answer
83 views

Maintaining two permalink structures

How can I create two different permalink structures for a Wordpress blog, determined by an addition to the post meta? On the old site, articles were available through the following structure: ...
0
votes
2answers
39 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
0answers
29 views

Post with multiple 'content's and muliple comment lists

I am sorry my post looks long. I am creating a private small community for a group of authors. Their final goal is to create, online, an encyclopedy relative to the holy book. In other words, to each ...
1
vote
1answer
162 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 ...
0
votes
2answers
93 views

Which query method to use? (edit- wpdb syntax problems)

I am trying to create a query in order to get all the metadata from a custom post type named match_reports that is associated with a meta_key and meta_value in another custom post type named ...
0
votes
1answer
38 views

Array of user ids to list of user names

I'm outputting an array of user ids from metadata like so: $awaygoalby = unserialize($post_meta_data['report_away-scorers'][0]); and I want to change each user id to the user name. So I was hoping ...
0
votes
1answer
282 views

Conditional For get_the_author_meta

In post loop I'd like to setup a condition for get_the_author_meta. So if the author meta field is empty, then nothing is displayed. Below is what I have but it's not working. <?php ...
0
votes
0answers
157 views

Using mysql queries to delete custom post types based on meta_value

I am trying to create a cron job to run on my server which deletes a custom post_type (post_type = event) from my databse based on a meta_key (st_date) and a meta_value (the date the event took place ...
0
votes
0answers
62 views

Ranking authors by post meta value

I have custom post-type with custom post-meta and i want to rank authors by post meta value.I can show the SUM of a meta value on author page with this code <? php $points = ...
0
votes
1answer
134 views

How to display custom post meta in the appearance->menus page

I'm working on a website and added a custom meta option for all pages / posts called: "Location". $value = get_post_meta( $post->ID, '_privacy_location', true ); I'd like to add the value on ...
2
votes
1answer
191 views

Save HTML formatted data to post meta using add_post_meta()

Array ( [post] => Array ( [jw_objective] => Exposure to e<b>nd to end development</b> of various applications; right from requirement analysis to system ...
0
votes
2answers
191 views

Save post_parent in a custom post type

I'm using the save_post action to save some meta data in a custom post type: function my_save_post($post_id) { // is autosave? if(defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) { ...
0
votes
0answers
61 views

Wordpress join posts with meta values of array type

How do I get all the posts matching meta value of type array function author_posts_join_filter($join){ global $wpdb,$wp_query; $meta_name_author = '_authors'; if(is_author()){ ...
0
votes
1answer
125 views

Get meta information from post parent

So I am in a single page and I want to get some meta information from a parent page. This code is inside my footer.php: if (is_single()) { global $post; $parent = get_post_achestor ( ...
0
votes
2answers
162 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 ...
6
votes
1answer
669 views

Save camera info as metadata on image upload?

I am trying to have WordPress automatically save the "credit" metadata that is stored within images I am uploading. I know this would be entered as a custom post meta field using update_post_meta(). ...
0
votes
2answers
190 views

Metadata for a taxonomy - is there any WordPress way of doing this?

If I have a CPT "movies" I know I can have various taxonomies eg "Director", but how can I store further information such as "director's nationality" for any one particular director ... or is this ...
0
votes
2answers
748 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 ...
1
vote
1answer
387 views

WP_query posts closest to todays date

I have written an wp query which I would like to order in a bit of a complicated way. Some posts have a meta value 'the_date' which is an end date for the post. I would like to order posts in date and ...
0
votes
1answer
148 views

Modify custom field from front end

If I need to manage a custom field under wordpress, but not from the admin area. In other words, I need that users modify the content of post custom fields from front end. What is the way to do so? ...
3
votes
1answer
653 views

How can I filter posts by post_parent in the admin?

I have followed this tutorial and this one to add a custom column to a custom post type edit screen, showing the post parent of each post. My question: How can I make the post parent clickable just ...
0
votes
0answers
171 views

_wp_attachment_metadata necessary for importing images into wp_postmeta table

I'm working on a project to convert an older custom developed PHP site into a WordPress site. One of the problems I'm trying to figure out is how to import all the images from the old site and ...
0
votes
1answer
89 views

Adding an orderby filter, casting postmeta with multiple keys

I am using this filter to sort my query by a date field stored as text (legacy data) add_filter( 'posts_orderby', 'my_posts_orderby_date', 10, 2 ); function my_posts_orderby_date( $orderby, $query ) ...
0
votes
2answers
889 views

How to get custom image field of specific post id

I have a page where I'm pulling in content from another post, outside of the loop. I've been successfull at getting the content of the specified post, but I cannot get the image from a custom field ...
2
votes
1answer
301 views

How to update/delete array in post meta value?

I using post meta like.. $meta = get_post_meta(99,'_mymeta',true); $value = $meta['somekey']; echo $value; But how to update $meta['somekey'] to some another value ? How to use update_post_meta to ...
1
vote
0answers
350 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 ...
0
votes
1answer
36 views

New Table vs Post / Comment Meta

I am working on theme where I am adding vote functionality to comments and posts. What should I use, meta tables or create a new table?
2
votes
0answers
219 views

Copying Custom Meta Values from existing post to a duplicate post

I'm trying to revise an existing WP plugin BU Versions to accept different custom meta field values from items I've set-up using the Advanced Custom Fields (ACF) plugin. BU Versions will copy over ...
-1
votes
1answer
183 views

Custom Form Data save after Login User

This is form on my first page. I have to manage if user is not logged in, in that Case after submit form action is Login Page. <?php/** Template Name: Form */ get_header(); ?> <form ...
0
votes
0answers
60 views

hide an author_meta on a post if the Co-author function is active

I want to hide an author_meta on a post if the Co-author function is active on a post. For example: This is how it looks with one author By Author Name | Contributor Published: 05/03/2013 2:00 ...
0
votes
0answers
87 views

Retrieve post data via WPDB class

I'm trying to figure out doing a custom query using the $wpdb Object. I have custom type posts, event_posts, that have meta data, images, as well as event dates which are input in the post with the ...