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

learn more… | top users | synonyms

1
vote
1answer
303 views

Create digital-virtual-downloadable WooCommerce products from the frontend using Gravity Forms?

A little background about my issue: I'm running WP + WooCommerce + Gravity Forms and want to enable users to create WC digital-virtual-downloadable products from the frontend using GF. Essentially, ...
0
votes
1answer
7 views

get_post_custom: get image URL instead of image ID

I know the value of a image custom field will give me the attachemnt ID. In a loop over all custom fields, how can I found out if the field is an image? And then get the image URL of the attachemnt? ...
3
votes
0answers
30 views

Media manager multiple selection

I was creating a plugin, and its part should by adding files to custom posts. I managed script to work, but after few changes, to better look and function, it allows only one file to be added, than no ...
0
votes
1answer
227 views

Counting number of identical meta keys

Im looking to count how many meta keys exist within a post, because each time a specific user action happens, a new meta key is created with a date in it. I have this, which does not return anything ...
1
vote
1answer
461 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
18 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
1answer
227 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 ...
0
votes
0answers
19 views

Editing post in admin panel

I have a front end posting form. Everythings work nice, but the custom (meta) fields i added in the form doesn't appear in admin panel post edit? I add them with add_post_meta() function. Any ideas?
2
votes
1answer
351 views

Admin Area Custom Type Search By Meta Fields Without Title & Content

I have a custom post type that uses several meta fields. In the admin area I would like to be able to search by those meta fields. I have implemented this currently in my functions.php with this code: ...
0
votes
0answers
21 views

Delete duplicate posts where meta_key is the same

I have imported some posts and this has caused some to be duplicated Each post (of a custom post type "property") should have a unique meta_key "import__id" value I need to delete all duplicate ...
-1
votes
1answer
22 views

wp_postmeta store multiple values in one key [closed]

I am currently storing some data in a custom field like this: $get_ref = $_SERVER['HTTP_REFERER']; $ref = get_post_meta($post->ID, 'page_ref', true ); $ref[] = $get_ref; ...
0
votes
1answer
504 views

filtering custom post types via meta data drop down

I'm trying to add drop down filters (that are populated by terms that are in use) to a custom search page for "opportunities" or listings page. Currently I am doing this with taxonomies but doing this ...
-1
votes
2answers
95 views

Calling Data from Custom Meta Box

I have created a custom meta box which I have pasted in functions.php (minus the <?php call of course) I have two fields in this meta box, one is labeled 'Primary Title' and the other is labeled ...
1
vote
1answer
34 views

How do you handle postmeta in admin area?

I've a bunch of techniques to add some information in admin area for users. For that I use WordPress APIs and meta boxes. Ok it's cool but what if I want to display information that are set with the ...
1
vote
2answers
47 views

Update meta values with AJAX

I am working on a voting system in Wordpress. I first made it with GET requests but someone told me you should not use GET for this, So I started working with AJAX to update custom fields/meta values, ...
0
votes
1answer
40 views

Show future events based on custom field AND order by date

I have a custom content type (event), within that type I have a custom date field, with the name: 'date'. In my template I am running the WP_Query to return a list of events. I would like to only get ...
9
votes
4answers
2k views

Can the Next/Prev Post links be ordered by menu order or by a meta key?

I have a series of posts that are ordered by a meta_key value. They could also be arranged by menu order, if necessary. The next/prev post links (generated by next_post_link, previous_post_link, or ...
1
vote
1answer
460 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
1answer
714 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 ...
0
votes
1answer
246 views

Create action running on trashed_post hook to modify post_meta value

I have a custom post type that always do math operation to its post_meta and other custom post type post_meta. For example: post-type 1 = cpt_product_order post-type 1 post_meta = ...
2
votes
2answers
81 views

Automatically adding meta data to posts or multiple query help

I run an events company whose website uses a custom post type system for posts (blog), events and tickets all stored as CPT's in the DB. On the guestlist (which counts 'ticket' custom posts if the ...
1
vote
3answers
122 views

Searching by meta values showing inappropriate result

I am working on a custom search by meta value and using this: print_r($_REQUEST); $args = array( 'post_type' => 'property_post', 'posts_per_page' => 10, 'order' => 'ASC', ...
0
votes
0answers
17 views

Save voting stats with Posts 2 Posts

I am working on a website where I make connections from posts to posts with the Wordpress Posts 2 Posts plugin. Now I want my website users can vote whether they think the 2 connected posts are a good ...
2
votes
2answers
3k views

Properly add an upload media button in a meta box field

i have a custom post which has a meta tag that needs to be using a file upload (for video files). I am wondering, what is the correct way of adding an Upload button that points to the wordpress media ...
0
votes
1answer
39 views

Adding a meta box to determine the sidebar [closed]

I was trying to customize my WordPress, and I have added some custom meta boxes (it adds custom field) to add values in it, but I don't know how to do this one... I want to a Meta Box, which will be ...
8
votes
1answer
299 views

Why are simple updates to wp_postmeta's “_edit_lock” so slow?

In our MySQL slow query log, the cumulatively slowest query is a simple update to wp_postmeta. Here's an example: UPDATE `wp_postmeta` SET `meta_value` = '1392835505:386' WHERE `post_id` = 94705 ...
0
votes
1answer
65 views

Problem With Order Item Meta In Woocommerce

I'm following Xatic's tutorial to help me add custom data to products. I've managed to be able to have that data on the cart page. However, it doesn't display in the order page in the admin backend. ...
1
vote
0answers
19 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 ...
0
votes
0answers
16 views

Change default options on attachment page

I'm currently adjusting someone's plugin, and they're pulling data from the attachment page. Rather than edit the whole plugin entirely, I'm after a quick fix. Is it possible to change the wording on ...
0
votes
0answers
36 views

New WP_Query loop in admin causes problems

I am working on a project where I have a custom post type 'companies' and on this edit page in the Wordpress admin I have some custom made meta boxes, for saving company information, opening hours, ...
-1
votes
0answers
34 views

term_id a 13 character string, not an integer. How do I replicate this? [closed]

I am trying to manually insert meta data to a post that requires the term ID within it. I expect it to be a number but it is in fact a 13 character string. Revising the plugin code, I see this: ...
1
vote
1answer
26 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
2answers
2k views

Repeatable custom meta fields

I am working on creating custom meta boxes for the back-end of WordPress. I would like to add a metabox with several fields, in my case an image upload and a text input, but with a button that can ...
0
votes
0answers
32 views

Mysterious template change after database import/export

When I switch databases from my local environment to the host, some of the pages inexplicably change templates. E.g. there is a custom template "Home" and when I switch the db's it ends up with the ...
4
votes
2answers
99 views

Order by optional meta key?

I'm building the sorting functionality for a custom post type, and I have a custom meta value for "Featured" posts. This value is set when you tick the checkbox, otherwise it is not set. Using the ...
0
votes
2answers
35 views

Get attachment meta (I need attachment ID, unsure how to find it)

I've got the following example code, which creates a custom field and adds to the attachment meta: function be_attachment_field_credit( $form_fields, $post ) { ...
0
votes
0answers
224 views

Using a query to display custom post types based on ACF post_object

Basically the set up I currently have is two sets of custom post types which are: uc_university and uc_course I'm having lots of trouble trying to display a course based on a my Advanced Custom ...
0
votes
0answers
14 views

Link to post meta page (like WordPress does for categories)

I've got a few different categories, and each has it's own page. And obviously WordPress automatically links to the category template page: category.php. However, is it possible to do this with ...
0
votes
1answer
28 views

How can I hide the category term for posts with none set?

I'm trying to hide the word "Category:" from the metadata on the Twenty-Eleven theme's footer, when I don't have one set for a given post (sometimes I will manually remove the "Uncategorized" ...
2
votes
2answers
248 views

Grouping related postmeta data via SQL query

I am using someone else's WP plugin which stores lots of related data in wp_postmeta using an "artificial key". So effectively we hijack wp_postmeta to create a nested relational database. So one row ...
0
votes
3answers
624 views

If Post Meta Equals Current Title Conditional Advanced Custom Fields

I would like to create a custom query loop to display data depending on the current post title. Pseudo-code: if post title = custom filed Show related content I have a page called artists ...
1
vote
3answers
32 views

get_*_meta doesn't always return an array

I find it annoying that functions like get_user_meta or get_post_meta will return an array if the meta key exists or false if it doesn't. This means I need to do a check like so: $meta = ...
0
votes
1answer
909 views

Hide Post Meta Data on a specific category

I'm using the Canvas theme from Woothemes, and their framework (obviously.) I built a child theme and have my custom CSS segregated in a custom.css file in that directory. I've made some changes to ...
0
votes
1answer
21 views

Remember the meta value with radio buttons

I've created a simple meta box consisting of two radio buttons: yes or no. When they click on the appropriate box, it saves the meta value to the database. However, the post page does not remember it ...
0
votes
1answer
53 views

Timetable of Custom Meta Data using Custom Post Type and Custom Taxonomy

Scenario: I have a custom post type with custom meta boxes. Each post should represent a row in my table i.e Activity 1 Jan, Activity 1 Feb and Activity 1 Mar I have a custom taxonomy of terms ...
3
votes
1answer
1k views

Filtering posts by post meta data

I want to filter posts in such a way that only posts, for which get_post_meta($post->ID, "project_cat", true) (it returns a post ID) is equal to my specified value, are shown. Any way to do this? I ...
0
votes
1answer
529 views

Auto save title as custom meta field value

I create a custom post type where I removed the "Title", instead I want to use one of my custom meta value to become the title. This is just to make sure the title look good. Know that the post ...
0
votes
1answer
98 views

Search custom post type by meta data

I have a custom post type 'Property' which my users need to be able to search by meta data. I have 3 search functions - 2 on the frontend 1 in the admin area - 2 of which are running as expected and ...
0
votes
1answer
51 views

The loop starting at a certain ID

Is it possible to start the loop from a certain post ID? I would like to get all the post starting at a certain ID, decendingly. To explain, I have to make sum assumptions first. Assume that my ...
0
votes
2answers
38 views

Short of raw SQL, can I query for multiple attachment metadata that have a given array key?

With raw SQL through $wpdb, I believe that I could do something along the lines of this (untested): SELECT post_id, meta_value FROM postmeta WHERE meta_key = '_wp_attachment_metadata' AND meta_value ...