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

learn more… | top users | synonyms

3
votes
1answer
291 views

Change post format using custom field

I'm creating a theme using the CF Post Formats plugin. But I've run into some trouble I don't know how to solve. Here's what I want to be able to do: Create a new standard-format post Enter a url ...
0
votes
0answers
39 views

I am stuck between post meta function to call unique id

I have created a system on which on the front end it is possible for user to write a little suggestion below the post. It's separate from the comment system The code I used is <form method='POST' ...
0
votes
1answer
287 views

Adding meta tag without plugin

Is it possible to add meta title, meta description, meta keywords in every page without installing plugin? My client require not to install plugin. I am curious about this case, all I know is the ...
0
votes
0answers
20 views

Fetching array of postmeta with $wpdb and in_array conditional

I'm trying to fetch an array of all entries to a specific meta key and then check to see if the user input value exists in that array. I've checked the data base for the query and I see the meta ...
0
votes
1answer
16 views

When post is updated, custom metadata in text area field is overwritten

I have set up 2 new post meta fields in order to add functionality to a custom post type. The custom fields generally work as expected, with a couple exceptions. I set up a checkbox (called ...
-1
votes
0answers
17 views

Echo PHP Meta Box Variables [on hold]

I'm a PHP beginner. I have a custom meta box using Fluent-Framework, and I need to echo my data. What I'm doing isn't working in the slightest. On each post I can input my value for text, which ...
1
vote
0answers
18 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 ...
2
votes
1answer
555 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: ...
2
votes
1answer
414 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
0answers
7 views

Meta Box size issue. How to resize it properly?

I cant figure it out how to resize meta box . I did try to add something like rows="5" cols="60" but no luck. With width and height box resizes but when text fills the box it continues to the right it ...
0
votes
1answer
19 views

Categorizing posts by location

I'm starting to work on a new project for which I will be using WordPress to facilitate content management. I have some experience building WordPress themes but it has been mostly related to page ...
0
votes
2answers
370 views

Insert data from custom created PHP page into wp_postmeta table

I am working with a Wordpress site and have created a custom page in /home/planmyme/public_html/php/ with the name response.php. On this page I am getting a value to insert in the wp_postmeta table ...
2
votes
2answers
70 views

Can wp_query return posts meta in a single request?

I would like to create a wp_query that would return posts meta inside the posts array. $args = array ( 'post_type' => 'page', 'meta_key' => 'someMetaKeyName', ); // The Query $query = ...
0
votes
1answer
18 views

Order by in foreach

hello im getting post_id by using wpdb after that i wanna show postmeta(sd_l2) order by their value i uses this codes global $wpdb $top5_ov_performance = $wpdb->get_results("SELECT post_id FROM ...
0
votes
0answers
30 views

PDF.js with annotations (Method Draw) in wordpress plugin

I'm not sure whether to post this in here or in stackexchange, but since it's built into WP... I started to create a PDF viewer in Wordpress with PDF.JS, located here: ...
0
votes
2answers
332 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 ...
17
votes
4answers
31k views

Advanced search form with filters for custom taxonomies and custom fields

I'd like to build an advanced search form for a specific custom post type, having filters for the custom post types custom fields, custom taxonomies, and for a separate custom post types properties ...
0
votes
2answers
455 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
31 views

Ordering posts having multiple post-meta date fields

Hello WordPress developers. Over the years, I've found answers to many questions I've had with WordPress. I want to thank you for your help. Today, I have a question myself, and seek for expert ...
0
votes
1answer
378 views

Using radio button meta data from a custom meta box

Very new to attempting PHP and am hacking together my first plugin using tutorials.. I have a custom meta box with a Yes/No radio button on all WordPress pages (in the editor). EDIT- I removed the ...
0
votes
1answer
3k 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
2answers
734 views

Build Array from Input Fields question

I have a series of input fields sets: <input type="text" name="people[name]" /> <input type="text" name="people[lastname]" /> <input type="text" name="people[email]" /> <input ...
0
votes
1answer
325 views

Unique Post Meta Values

I want to use Unique IDs like YouTube video IDs and WordPress post IDs in a custom field 'youtube_id'. I just created a front-end add post page and want to check if 'youtube_id' used or not used in a ...
0
votes
1answer
293 views

How to get meta value in wp_attachment_metadata

I want to get wp_attachment_metadata in my own way. I want to separate the sizes (Thumbnail, Large, Medium, Small). The meta value on database looks like this: ...
0
votes
2answers
418 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
1answer
2k 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
269 views

Dynamically get the meta key value of a menu item based on it's post ID

I have a menu, that I need to insert an image that have it's path saved in a meta key (_menu_item_img) and associated with a post ID, every menu entry has it's own image, and I need to grab it ...
0
votes
0answers
23 views

Meta query with regular expression

I am using regular expression to refine the post it works fine but i want change it such that it can work with meta query instead of post title here is my code function wpse18704_posts_group( $where, ...
0
votes
1answer
653 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 ...
1
vote
1answer
1k 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 ...
2
votes
2answers
839 views

Correctly delete posts with meta and attachments [duplicate]

I am having an overview of custom post types. These have custom tax and also an attachment. In my overview I need to provide links to delete the entries. With that I also need to delete the ...
0
votes
1answer
24 views

How can i get multi checkboxes value in metbox?

I make list of check boxes by WordPress meta-box and i can not get this value in my theme. i can get my text value with this code <? echo get_post_meta($post->ID, $prefix . 'text', true); ...
0
votes
1answer
330 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 = ...
1
vote
1answer
594 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 fine until the time we press upload and save the data. The only ...
0
votes
0answers
14 views

Send POST variable with 'post_publish'

I have a custom button which triggers my page builder to load on the post.php page upon clicking it. However, I want to send a variable as well with it. Here's what I tried $('#post').attr('action', ...
0
votes
1answer
21 views

php wp_insert data on front using a form

I'm using a form on my website to allow user to create posts on my wordpress admin. It works fine, but I have an issue, I don't get the tags meta inside my admin. here is my php code : <?php ...
0
votes
1answer
44 views

Comparisson between date() and a date from wp_postmeta

I am using the calendar plugin: "The Events Calendar", and is trying to get the events that are done. I can't see what it is that I'm doing wrong, but I'm pretty sure that my meta_query is wrong, ...
0
votes
0answers
25 views

Ajax add_post_meta()?

I've got a custom meta field that I need to work with ajax (like the tags field). This is the function I currently have: function prfx_meta_save( $post_id ) { // Checks save status $is_autosave = ...
0
votes
1answer
23 views

Display all meta for a post?

I have a custom meta field for my posts and I'm able to display the value. But it only displays one row. Since I have more than one value I need to display all of them. I know I probably have to do ...
1
vote
3answers
64 views

WP Query post meta value

I'm trying to get posts which have applied the meta value trainees. $args = array( 'posts_per_page' => -1, 'orderby' => 'post_date', 'order' => 'DESC', ...
1
vote
1answer
983 views

Custom fields to save multiple values

I’m adding custom meta-box, by means of jquery I can create in it several custom fields with a key “test”. There can be one or several custom fields, but the key is only “test”. I can also delete key ...
13
votes
4answers
7k views

Post meta vs separate database tables

When developing plugins that requires data storage, what's the pros and cons of using one method or another ? The explanation given in the codex is not detailed: Before jumping in with a whole ...
0
votes
3answers
788 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 ...
4
votes
1answer
70 views

What is the most efficient way of querying posts based on visits and date for current day?

I am about to develop a piece of code for my site to display the most popular posts of the day that are X days old. I would like some help from you to achieve this the most efficient way. This is ...
0
votes
1answer
6 views

Updating post_meta when updating a setting with the Settings API

I'm currently using the Settings API and, on saving my options group, I need to simultaneously update post_meta based on the options that have been saved. Is there anywhere within the Settings API ...
1
vote
2answers
26 views

sanitizing integer input for update_post_meta

When updating a post meta where the input will be always an integer, should i use (int) or is there any WordPress function for that (eg. sanitize_text_field) For example ...
2
votes
2answers
329 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
1answer
16 views

How to display post meta data in secure manner

I have have a custom post meta field where I can add a embedding code (a video for example, an iframe). Now I want to retrieve the code from the post meta and display it securely. I can display it ...
0
votes
0answers
45 views

How to show specific meta keys of all posts in admin panel?

I have some common meta keys on every post. Ex: hotel_person, hotel_number All the posts have these two meta keys. I want to show these meta key values and the post titles. All these values and ...
0
votes
0answers
23 views

save_post is not firing when I only edit custom meta fields

I've come across the action hook save_post few days back and I like to take advantage of it. I've custom post post type "Property" with Meta fields associated with it. The problem is that when I ...