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

learn more… | top users | synonyms

3
votes
0answers
30 views

Wordpress retrieving meta data for all custom post types in list view

Im having an issue in WP where php is dying, ive increased memory but the process jumps to 100% cpu usage then dies and apache throws a 500 error. Ive tried to get apache to log something, or php / ...
2
votes
0answers
156 views

Storing revisions of metadata for custom post type

Storing metadata for custom post types is easy, you just need to add an action for 'save_post' with your method that handles this. In which you have then something like the following for a field that ...
2
votes
0answers
755 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
vote
0answers
25 views

hide posts with specific meta data from admin page

Does anyone have ideas on how to hide posts which has a metadata with a specific value from admin panel (the posts table which is shown when clicking all posts option from posts tab) thank you in ...
1
vote
0answers
20 views

How to retrieve an array of post IDs by a particular value stored in a custom meta's array

I have a custom post type 'projects' that has custom post meta 'members'. 'members' stores an array of another custom post type's IDs. I'd like to do loop through the 'projects' posts that have a ...
1
vote
0answers
31 views

Dynamic Custom Fields

I am working on a custom invoicing system for a client. I am looking for the best way to implement adding products dynamically to the invoice in the wordpress admin. There are hundreds of products ...
1
vote
0answers
26 views

Show Custom Post Type meta boxes only on Page Edit

I've went through the laborious process of creating the CPT. I see it on the sidebar of my WP install, I can add new, save data, and on frontend I can output the data. Is it possible with WP to move ...
1
vote
0answers
32 views

Get draggable widgets on Edit Post page

Is it possible to get the widgets with settings (just as widgets.php page) on the Edit post (like attached image) ? There i can define a custom sidebar in post meta. However how to get the list of ...
1
vote
0answers
44 views

Default Custom Field Value Automatically Update

I have created a hidden custom field with a php function as its value. Like so -- $value_rating = get_post_meta($Property_Id, 'vr', true); <input type="hidden" name="vr" class="form-control ...
1
vote
0answers
17 views

Show values of custom post meta on 'Add new post' page?

I am developing a website in which I am giving my users a separate profile. Their profile includes a dynamic slider. I made a custom post type named 'Slider' and added all images using: ...
1
vote
0answers
34 views

How can I create a WP_Query that returns posts where one meta_value <= another meta_value

I have a working, pretty complex SQL query hand-written in a function. For the sake of leveraging WP_Query optimizations, and simplifying my code for maintainability, I'd like to convert it all to ...
1
vote
0answers
111 views

How to compare two posts including their meta fields on a scalable base?

I have set up a wordpress in a way that posts can be cloned and be altered by a different author. whenever this is the case, i want the administrator to be notified via an additional tab in the ...
1
vote
0answers
319 views

Undefined index error in custom post metabox

I'm getting this error with my custom post metabox. The custom post and metabox works fine, but if i have debug on and when i try to save any other page or post, i will get an error: Notice: ...
1
vote
0answers
123 views

Custom filter function not working with Custom post type

I have custom post type "soto_property". I have made a custom filter to filter post listing according to used meta data named "operations". Here is my code- <?php add_filter( 'parse_query', ...
1
vote
0answers
491 views

Compare meta_query with a Regular Expression and do a less-than operation on it

I have the problem that my client is using a theme which stores options of items in a serialized way in the post_meta table. I already found out that this is not the best way to save values ...
1
vote
0answers
69 views

Post MetaTable Overload

Anyone run a wp site with a large amount of post meta data? My site uses ACF with several custom post types and at least 20 custom meta fields with each of my custom post types. I have over 1000 ...
1
vote
0answers
117 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
0answers
115 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
0answers
1k 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
176 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
0answers
106 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
0answers
115 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
368 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 = ...
0
votes
0answers
11 views

Storing a many to many post type relationship in post meta and keeping SQL ability for Joins

I have 2 Custom Post types and i am manually keeping a relation between them in a many to many relationship by keeping an array as a custom field. All PARENT post types have ONE filed in wp_postmeta ...
0
votes
0answers
16 views

Use $wpdb->get_results with filter based on array

I need to filter my SQL query (in a plugin) based on an array of meta_values. I have CPT-A which is related to CPT-B. I am keeping an array of CPT-A ids in meta_key afz_entry_tags of CPT-B I need ...
0
votes
0answers
11 views

Does get_post_meta result in a database query each time?

I want to add some new functionality to a post type. It is going to result in a dynamic number of meta fields. I want to know if i could consolidate the content into a single field (messy) or to ...
0
votes
0answers
21 views

Missing Post Meta and '0' value or meta ID

I have a custom plugin that saves metadata to the DB and has been doing so for months. All good. My latest issue is that post_meta values are disappearing (post title, content and taxonomies seem to ...
0
votes
0answers
45 views

How to show twitter link preview (Card View)

I want to ask about my problem. I can't show twitter link preview for my website and for information, I just add this code i get from WP Beginners <?php #twitter cards hack if(is_single() ...
0
votes
0answers
33 views

Why are my custom metaboxes not updating the post meta?

It works fine when creating a new post, but nothing happens when I edit a post. What am I doing wrong? function imgw_save_contest_meta( $post_id, $post ) { global $post; if( ...
0
votes
0answers
30 views

How can I make my plugin display custom post meta data on the front end?

I have been googling this for quite a while but have come up with nothing. I am writing my own plugin and I need to display custom post meta fields on the front end on the archive page. How can I do ...
0
votes
0answers
17 views

Custom Fields with pre-filled content

as this is my first post here I first of all like to say "Thanks" because I found a lot of hints here for my problems in the past. Now I have to ask for the first time: We are offering news under ...
0
votes
0answers
31 views

add_post_meta only adding 1 character

I am trying to make a form that auto posts without needing to be signed in. So far I'm testing with dummy data, but I'm running into trouble with the add_post_meta part. It seems to only be adding 1 ...
0
votes
0answers
24 views

Order by meta_value_num issue

I am using meta_value_num to get the list of teams by their ranking, it working fine in 1,2,3,4 etc position, but in case of 11th, 12th, 13th etc position it consider them as a second position, the ...
0
votes
0answers
17 views

How to avoid duplicate post entry admin page

I am building a cinema website with different custom post types. How do I avoid duplicate post entries? For example, I have a post type: Trailer First I add a trailer Terminator. After if I add ...
0
votes
0answers
30 views

Using esc_html for textarea inputs

I am using the following code for a variety of input fields, building a CPT for a theme: function display_meta_box_from_cpt <input type="text" size="80" name="imgurl" ...
0
votes
0answers
11 views

Set all values of given meta_key in postmeta?

I have a custom post type to which I attached several fields of meta data. On a given action in the admin, I need to be able to reset the values of a specific meta_key in that meta data to zero for ...
0
votes
0answers
17 views

Button inside a custom meta box which deletes post meta

I have a custom meta box which allows a file upload. I want to add a button for my users to be able to remove the file (or at least clear the meta data for it). To delete the post meta, I know I can ...
0
votes
0answers
21 views

Filter question list on substring of metavalue

On the admin page I want to filter posts based on meta values. I know using the pre_get_posts hook will allow me to filter based on specific meta values, however I want to filter on a certain ...
0
votes
0answers
26 views

Find page metadata in database

I want to insert metadata to custom fields (from "advanced custom fields" plugin) manually (with wp_update_post_meta). I need to know how the meta value strings look like so I can insert this kind ...
0
votes
0answers
20 views

Edit is changing my custom's post type parent id

I'm having a custom post type (vehicle) and i attached a gallery (post) with image attachments in it. Through my custom frontend form, I set all the post and postmeta details right, as i want to, so ...
0
votes
0answers
23 views

Trying to automatically set woocommerce product dimensions on save if left empty

So I'm trying to automatically set product dimensions & weight on a site if they're left empty, WooThemes told me I can use this as a starting point but the rest is out of their support scope. ...
0
votes
0answers
42 views

Show posts in numeric price order using meta query combining 2 meta keys

I've built a custom estate agency website for a client but I'm stuck on this one last thing before it's good to launch. I'm using custom meta fields to allow for additional meta data such as Price, ...
0
votes
0answers
11 views

Generate meta_value programatically for thumbnail in Ruby

I am inserting posts in wordpress db using ruby. The problem is that adding a post thumbnail, there is a met_value field in post_meta table that has an auto generated hash which looks like ...
0
votes
0answers
57 views

Insert image caption (metadata) in shortcode in functions.php

I've created a shortcode that displays a random image given that certain parameters are filled, like img url and number of images to random through. It looks like this: function randimg_shortcode( ...
0
votes
0answers
156 views

How to find field key name of meta values ?

Using visual composer to create custom grid elements made me wonder: how can I find the field key name of a meta value ? I need these to include in a template of a grid element or for different ...
0
votes
0answers
34 views

Custom Table for custom post type meta data

I'm looking to store the meta data for a post type in a uniquely named table. You see I have a site with a large amount of custom post types with a large a mount of custom fields. I want to clone ...
0
votes
0answers
8 views

How to use Wordpress Functions in php file linked to email piping

I'm writing an plugin to add meta data to a post when I receive an email. So far my plugin receives the email correctly, but I need the WordPress functions to update the metadata. I can already get ...
0
votes
0answers
46 views

WP_cron not updating post meta, instead clearing it

I'm trying to store social media follower count (ex. FB fans, Twitter followers) in post meta daily with wp_cron. If I manually save the post it will save the social media count numbers correctly in ...
0
votes
0answers
21 views

Problem saving meta data

I'm making my first WordPress plugin. I used an example to save text that an administrator enters when submitting a new post, but the meta data is not saving. Can anyone help on that? /** * Adds a ...
0
votes
0answers
63 views

Create a Gallery and update Post Parent of Attachment Images

I need to create a gallery for a custom-post and update the post_patent of every image with the new gallery ID function create_tfuse_gallery_group($post_id) { if ( get_post_type( $post_id ) == ...