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

learn more… | top users | synonyms

2
votes
1answer
18 views

Query Custom Meta Value with Increment

I have a Query searching for a meta value I have added to my posts (meta-select). I have it feeding out in a loop with 4 results. Let's say I want this loop to start with the meta value "2" and work ...
0
votes
1answer
32 views

Values inside a custom field to determine which category posts to display

I am facing a little problem whilst trying to display posts, from certain categories, on the front end. I've created a custom field whose key is 'related_categories' and I've different categories with ...
0
votes
0answers
11 views

Incorporating a meta query into a mysql query in wordpress

I'm trying to find a way of inserting a meta condition into this bit of SQL below... $query = "SELECT COUNT( ID ) as num_events " . "FROM $wpdb->posts " . "WHERE ...
0
votes
0answers
14 views

Re-order posts inside tax query

I have some posts having some custom fields and their value. I have custom fields like featured and expiry_date, whose values are yes/no and some date respectively. All these posts are coming under ...
0
votes
0answers
8 views

How to add download to post & more?

What is the correct way of adding downloadable content to posts? More complex situation: I have a portfolio, and sometimes I do stuff that is meant to be freebie and I want it to be downloadable. ...
0
votes
1answer
16 views

Sort Posts By Custom Field Date?

I have the following code displaying posts from a custom post type. However, I need them displayed in date order from information put in a custom field, can this be done? I try this code :- $course ...
0
votes
1answer
19 views

How to use conditional statement with custom field

I think it is a simple thing but I am not good on php so :( can you guys tell me how I can use an if condition with my custom filed. Below is my current code. <div class="courtesy"><?php ...
0
votes
1answer
23 views

Custom MySQL Query for Post and Post Meta

I have a custom table called "tags" that contains a charity_id that is a reference to a post ID ... I need to query the "tags" table to grab this charity_id and then pull in the post title and a few ...
0
votes
0answers
34 views

Display WordPress SEO title and description in Custom Taxonomy archive template [closed]

The WordPress SEO by Yoast plugin allows users to add SEO titles and meta descriptions to taxonomy term archive pages. These are then used in the head of the document on custom taxonomy pages. I´m ...
0
votes
0answers
24 views

Adding Image Description below Images Inserted into Posts

I've got a bunch of images inserted into posts with metadata I'd like to display underneath them: some have caption, some have description, some have both. I've figured out how to filter ...
0
votes
0answers
9 views

add_post_meta from front end form

I am trying to add new post and meta data from the front end. I have a form and a custom post type named 'parts'. Looking for the easiest way of adding meta box and passing a value from the front end ...
0
votes
0answers
52 views

add_post_meta not saved

EDIT I changed it to if(isset($_POST['Make'])) update_post_meta($pid,"Make", $_POST['Make']); if(isset($_POST['Year'])) update_post_meta($pid,"Year", $_POST['Year']); ...
0
votes
0answers
5 views

Create an audio playlist that bookends an audio file from posts with an intro and outro file uploaded to a specific page?

I am trying to create a Podcast audio player that will play on every page, and each page will have its own unique intro/outro audio files that bookend the main podcast file. I am pretty new to ...
0
votes
1answer
15 views

Unable to Call More than One Meta Box Output

I have a custom meta box with multiple text fields. I use this to call the information in the first box: <?php the_post(); echo get_post_meta( get_the_ID(), 'dbt_text', true ); ?> And this to ...
0
votes
0answers
18 views

how to echo/display the custom field value in specific custom field name?

I have tried this code: <?php query_posts(array( 'meta_key' => 'custom_cat', 'meta_value' => 'creative', 'post_type' => 'page' )); ...
0
votes
1answer
104 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
15 views

Why am I getting a “Call to member function format() on a non-object” error?

I am trying to add a hook to post saving using WP Frontend User When the form saves and the post is created within the "save_post" function I am trying to find the value of a custom field ...
0
votes
1answer
23 views

Include add_post_meta in a plugin

I am trying to call add_post_meta() from a plugin I have created. The plugin acts as a payment gateway for WooCommerce. This all works fine however I need to fire off the add_post_meta() at the end ...
0
votes
1answer
25 views

Retrieve data from post meta meta_key having '_product_fq_image' while having author_id and post type is PRODUCT

How can we retrieve data from postmeta having '_product_fq_image' while having author_id and post type is PRODUCT I have tried this $lt_content_design= get_user_meta( $user_id, 'lt_content_design', ...
0
votes
1answer
27 views

Custom Search Query – include only custom fields and title

I have a custom post type and I also need a custom search. I want the post title and two custom fields to be indexed/queried. I found solutions for title only and for custom fields but not for both so ...
0
votes
0answers
15 views

Post meta not appear in admin edit menu for custom post type

I have a custom post type 'Vehicles' within I have a taxonomy 'cars'. Also a front end adding from a html form. After the form is send, here is a sample what actually is happening. My idea is to hook ...
0
votes
1answer
142 views

using update_user_meta to rank users

I'm using a plugin that allows users to vote on posts, I'd like to add each vote that's cast to the authors user_meta so I can rank users the same way I rank posts. There's a couple of different ...
0
votes
0answers
31 views

Multiple meta data one label

I am wanting one label but multiple data to be under the label. I also want to reference each input option individually so that I can query for specific meta data. Currently I have, function ...
0
votes
0answers
25 views

Individual page data in one page template

So I am trying to create a one page template but still allow the user to add separate pages in the admin panel. What I did to output all the pages in one template file is as followed: <?php ...
0
votes
0answers
42 views

Prevent Duplicate Instagram Posts using Instagram API

Below is the code I am using to fetch every hour (using WP CRON) Instagram posts using the Instagram API, but more often than not I am getting duplicate, triple, and even quadruple identical posts and ...
0
votes
0answers
58 views

SQL query for converting post meta image url to featured image

WordPress guru, we have a question: We work on a website, which was not updated a while. Most of time it have wordpress 3.2 installed. We've updated it to the latest wordpress version, but ...
0
votes
1answer
29 views

retrieve wordpress post-meta using php not wordpress functions

I am trying retrieve wordpress postmeta USING PHP not WORDPRESS functions, it needs to be in php no wordpress functions please. this is what I have: $resultat = mysqli_query($con,"SELECT * FROM ...
0
votes
0answers
17 views

Replace meta_key _product_url

I have this 2 functions that replace the links in posts with an affiliate generated link . But it works only for posts and the links in the posts . I am running woocommerce and the link I would like ...
0
votes
1answer
20 views

Posts with no meta field do not appear when sorting by meta field

I want to order my posts by a custom meta field "fieldA". I am using the following code: $query->set( 'meta_key', 'fieldA); $query->set( 'orderby', 'meta_value_num' ); $query->set( 'order', ...
0
votes
1answer
24 views

get_post_meta() empty in preview WHEN custom post is published

So my client managed to find some (bug?), when custom post is published and he previews post all information what is posted with custom meta boxes is inaccessible. When I started debugging I found ...
0
votes
1answer
39 views

How to create content automatically when a post is published?

Goal: Ability to automatically create content in WordPress posts/pages. Goal Details: When a post is created/published, it will automatically create or configure content based on the base data inputs ...
0
votes
1answer
79 views

Insert data from custom created php page to wp_postmeta table

Hi i am working wordpress site here i have created one custom page in bellow directory /home/planmyme/public_html/php/ with the name response.php. on this page i am getting some value that value i ...
0
votes
1answer
31 views

Display a post count from a custom metabox selection

I was wondering if this is possible. I have a custom post type call projects that displays a metabox with drop down menu. In that drop down menu I have a few choices listed, draft, open, pending, ...
0
votes
0answers
35 views

How to save dynamically generated value in post type?

I'm trying to use the count of the amount of people that register a post id to a table in the DB. I want to save this COUNT value to the post_meta so when I display the list of posts it can also show ...
0
votes
1answer
133 views

Group WP_Query by meta_key date

I have a wp_query which lists posts from a custom post type, sorted by a custom field 'time'. I'd like to group this list by another custom field 'date', so that every post that has the same custom ...
0
votes
1answer
24 views

how do I set a schedule event to modify all posts's meta value weekly or monthly?

so far, I have added some functions to set post views count in post meta. But I want more: post_views_count_all: this is a post meta and save all post views; post_views_count_weekly: this is a post ...
0
votes
1answer
27 views

Can't Output get_post_meta?

I have a custom field for my post and I am trying to output it onto my post's page but nothing appears. I know my code works otherwise if instead of trying to call my custom field, I use a fixed ...
2
votes
1answer
61 views

How to make orderby 'meta_value_num' OPTIONAL?

$args = array( 'cat' => 5, 'posts_per_page' => 8, 'meta_key' => 'custom_sort_order', 'order' => 'ASC', 'orderby' => 'meta_value_num' ...
0
votes
1answer
24 views

Replace title column in post list with post meta value

I have created custom post type called booking. It have a meta booking_first_name, booking_last_name, booking_email, booking_phone, booking_phone_contact. Currently, I succeeded displaying email, ...
0
votes
1answer
45 views

get meta fields and taxonomy of any post type

I have created 6 different custom post type, each having different post meta and taxonomies associated with it. I am displaying all different custom post types in a dropdown using get_post_types() ...
0
votes
0answers
27 views

Search Form Including Price

I've been searching through posts & tutorials for four days now without any luck. My background is front-end web design but the latest project calls for a little more in depth work. I'm looking to ...
0
votes
0answers
56 views

User Answerable Multiple-Choice Question in Post

I am creating a plugin that adds multiple choice questions to WordPress. I wish for several to be displayed in a single post in a manner such that users may select an answer and receive instant ...
0
votes
0answers
14 views

Combine existing meta fields into meta data stored as an array

I'm trying to clean up a site of mine that has quite a few meta data fields for my posts and custom post types. I'd like to group these fields into meta data DB entries as arrays. For Example: I have ...
0
votes
2answers
260 views

Create Array from custom post type to display a slider

I have created a custom post type in my wordpress theme dedicated to creating slides for a slider displayed on the homepage, It has a title, slide text and slide url and also featured image. I'm now ...
0
votes
1answer
78 views

bulk update meta value with ajax

I want to update posts meta value in the wp_query to a different value on click. What I am basically doing is making a notification bubble (like stackoverflow). wp_query with the number of posts ...
0
votes
1answer
26 views

Meta Box Only in CPT Edit Page, Not in Add New

I have a CTP named leads and have 2 metaboxes added to the CPT new/edit screen. I need to have one of them only in edit screen, not in add new. Played with the codes provided in couple of answers, ...
0
votes
0answers
377 views

Displaying Metabox value (custom post type taxonomy)

I have been stuck on this for days, reading articles and articles and nothing works. I am trying to display the value of my metabox on a template page. I successfully added the metabox, and I see ...
0
votes
1answer
48 views

Meta title W3C Validation Error with

On the single post, the WordPress generates the meta title automatically but it gives validation error. This is what WordPress generates: <meta name="title" content="The post title goes here" ...
0
votes
0answers
35 views

add_post_meta displays in admin edit area

I use a simple way to add_post_meta() to wp_insert_post(). Everything's working fine, except my meta box doesn't appear in admin area. Is there a simple way to do that? <?php $condition = ...
0
votes
0answers
29 views

Whats the Mysql Query to Find each display_name stored in wp_postmeta.meta_value, grouped by username?

I created a custom content type that contains some fieds tos store user names (display name), thru a meta.key that is called 'opr'. Now i want a mysql query to find all custom postss date ...