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

learn more… | top users | synonyms

0
votes
0answers
17 views

Displaying randomly created meta values in wysiwig editor

I have already asked this question on stack overflow but I'm asking it once again here because i haven't found a solution to it yet. I am creating custom meta info for a post that will have null ...
0
votes
0answers
91 views

Query postmeta values, and return multiple post_titles for common meta value

As of now I query the DB: global $wpdb; $query = $wpdb->prepare(' SELECT p.post_id, p.meta_value, pm.post_title FROM %1$s AS p JOIN %2$s AS pm ON ...
-1
votes
3answers
99 views

Custom Post Type meta value is being saved in array, instead of just the string (as value)

So, this is how WordPress is saving my CPT meta: array(8) { ["product_id"]=> array(1) { [0]=> string(10) "abcdefg987" } ["end_date"]=> array(1) { [0]=> string(10) "02-02-2015" } ...
2
votes
3answers
173 views

How to make custom post meta wp_editor translatable?

I have custom post type named soto_property in which I have added three wp_editor as post meta, using this code - wp_editor( htmlspecialchars_decode($valueeee1), 'propertyEditor1', ...
0
votes
1answer
49 views

Value of post meta dropdown is not showing in Wordpress

I have a select dropdown in my post meta in which I am getting post ids of all post of another custom post type. see below code- <select name="property_type" id="property_type"> ...
0
votes
0answers
32 views

Post Meta Checkbox won't save

I'm trying to use the script as per How set featured posts using checkbox in post edit screen? function register_post_assets(){ add_meta_box('featured-post', __('Featured Post'), ...
0
votes
2answers
437 views

How to sanitize select box values in post meta?

I have added a select box in the Post meta. Here is the code, and it works fine. My question is, do I need to sanitize the values before updating the post meta? If yes, how it should be done? This is ...
0
votes
1answer
83 views

Best way to check if a post with specific meta exists

I am building a function in wordpress that reads an XML file and imports 100-500 events as a post type to wordpress. The events have a lot of meta data that is saved as post meta. One of the meta data ...
0
votes
2answers
60 views

Get meta info related to current post

I'm trying to get the meta info by key rw_related_link for each post but my code is wrong since instead get the ones related to the current post I got the same in all post and that's wrong. This is ...
0
votes
1answer
52 views

Act on user meta updated, but only once

My plugin is calling a third party over http whenever a users meta data is updated. To do this I am using the updated_user_meta hook. It seems however that that hook is called multiple times, once ...
2
votes
3answers
83 views

How do I remove all the metaboxes for a custom post type?

What's an effective way of removing all the meta boxes for a specific post type in Wordpress? The only solution for removing metaboxes at all that I've found seems to be the remove_meta_box() ...
0
votes
0answers
154 views

Save multiple custom post fields from quick edit

Context: A multiple custom posts and custom fields website. Since the website is rather complex, has a lot of users, a lot of editors and a lot of data, they asked to be able to choose which custom ...
0
votes
0answers
105 views

Show posts between two Custom Fields date

I'm trying to fetch all the posts from today to next week by using some custom fields inside posts, using Advanced Custom Fields. Everything was working until now, because it doesn't show posts from ...
0
votes
1answer
38 views

Advanced Custom Field — grabbing post_meta from previous post

Say I have an acf called "show_this_tomorrow" every day (in a new post) I put some data into the field. And I want to show that data output on the next days post. I was thinking I'd use this to grab ...
0
votes
1answer
121 views

Edit post meta direct from post.php?

Does anyone know of an easy way to be able to edit ALL of a single post's meta at once ie on the post.php &action=edit page? As some of the meta has been put in there with the update_post_meta() ...
1
vote
1answer
80 views

Advanced Meta Query for Large Calendar Website (12k+ posts) (175k+ wp_postmeta rows)

The Problem On a site I built, I opted to use custom fields instead of a calendar plugin to organize my posts in a "calendar". In the beginning this seemed like the most logical way to accomplish ...
0
votes
2answers
46 views

Looking for suggestions on creating simple database (Help!!)

I'm working on creating a basic database for a theatre and really need some suggestions as the best way to approach this. Each production from this theatre will have its own page. The page should ...
0
votes
1answer
84 views

Hide the_meta if no value

I would like to have post-data associated to posts and displayed on my blog. I added to single.php (as seen here: http://codex.wordpress.org/Function_Reference/the_meta) and all the metadata is ...
0
votes
1answer
83 views

post_title in save_post action

I use save_post action to save meta field and to check if post title is set. So I check the value returned by empty($post->post_title) but I get true also if I set the title.
0
votes
1answer
78 views

How to add a meta information to the URL?

I need to put a post meta information to the URL: www.website.com/custom-taxonomy/postname-[metainfo] How to change the rewrite rules, that the content of this meta information is added to the URL? ...
0
votes
1answer
137 views

Get all metadata for a given custom post type

I'm using a plugin that allows me to add people profiles as a custom post type, with several custom fields used for specific information. These posts are then output via shortcode on the relevant ...
0
votes
1answer
289 views

How to set YouTube video as featured image?

I am trying to have all my posts with post_format set as video, have said video as the featured image. Here is what I am working with thus far but I need some help: if($post_format == 'video') { ...
0
votes
1answer
114 views

Saving custom image meta fields

I have currently added a custom meta field for uploading a media file (image). I can successfully add the upload button to display and work but I'm having problems saving the field when updating the ...
0
votes
1answer
48 views

How to get several fields from wp_query?

I'm going to get several fields from wp_query result. I know about wp_list_pluck() function, but it accepts only one field paramether. How to get several ones if I'd like to take several parameters ...
2
votes
5answers
234 views

Best approach to create Hot and Trending sections

I am going to implement a Hot and Trending section on a website. I have seen such sections on many popular websites but can't really figure out how exactly this works. Although I assumed Hot section ...
0
votes
0answers
34 views

Serialized Data Being Cut Off?

I have two separate installations of WP on two servers. They're both the exact same website. In my CPT's meta, I have a field that's a very long piece of serialized data. On one server the full data ...
0
votes
1answer
52 views

Editor meta box Showing but not saving

I am trying to create an editor meta box and I have been following tips found in other similar questions without luck in getting the meta box to save and display its content. The meta box shows but ...
0
votes
1answer
127 views

How do i get value from wp_postmeta?

I am trying to get a specific value from wp_postmeta, I'm aware about meta_key and meta_value. Problem is Meta value stores lots of values and i want specific value. Here's the value in the ...
0
votes
2answers
251 views

Meta data (Tags and Categories) for Custom Posts not showing.

I registered a custom post type ("movie") with tags and categories. Now, I'm able to filter and search for the custom post with these tags and categories, so I know they're present and working, but ...
0
votes
0answers
217 views

Search by post_meta when field type is ACF relationship

A client has requested to use a relationship field to select contacts associated with the post. They have also requested that these posts be searchable by the contact information. The problem is, I'm ...
0
votes
0answers
237 views

value not saving in the form when dynamically creating an input

var AppendDivStore = jQuery(".AppendDivStore"); jQuery('<input />').attr( { type: 'text', class: 'PastetheSkillsValuemy'+inc+'', id: 'wpjobus_resume_skills['+inc+'][1]', name: ...
-1
votes
1answer
50 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
0answers
98 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
69 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
vote
0answers
251 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 ...
0
votes
0answers
40 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 ...
2
votes
2answers
1k 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
188 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
329 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
1answer
53 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 ...
3
votes
2answers
337 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
323 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
0answers
29 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
182 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
64 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
65 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
35 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
1k 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', ...
0
votes
1answer
14 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 ...
4
votes
1answer
160 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 ...