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

learn more… | top users | synonyms

0
votes
1answer
17 views

echo image caption

I am attempting to echo out my image captions in a Bootstrap Carousel. I have managed to get my images to display but unable to display my captions. I have attempted to use wp_get_attachment_metadata ...
0
votes
1answer
14 views

How to get only current images of a post

I am new to WordPress. I have created a template page where I want to show single posts, So to get media of that post I am using a function $args = array( 'post_type' => 'attachment', ...
0
votes
3answers
28 views

Display different information of a custom post type

I'm developing a real estate site for a client and I'm struggling a bit with it. I created a custom post type called "Property". A property can be on sale and/or on rent. Two different menu items in ...
0
votes
0answers
18 views

Woocommerce Adding product with php - not visible in shop [closed]

I have a very weird problem . I had plugin made that imports products to WooCommerce / post type product . It used to work great but since the last few updates something changed . It still works, ...
0
votes
0answers
19 views

Display Meta Fields Attached to Custom Post Type [closed]

If I have several custom meta fields attached to a custom post type, how can I display them inside the template-cpt.php file's loop? Especially when the single.php file has them outside the loop? For ...
0
votes
0answers
22 views

How to e.preventDefault() on an admin post page for a submit() action?

Lately, I have had a problem with a seemeingly simple task of preventing a form submission an a post admin page in WP. In a nutshell: I created a meta box on an admin custom-post page that includes ...
0
votes
1answer
22 views

Sort by custom field that is an array?

is it possible to sort posts inside a query based on post value that is in an array - but using the last element of the array? The code looks something like: <?php $mostsharedposts= new ...
0
votes
0answers
28 views

Ordering posts alphabetically by meta keys and title

I have a query for custom posts and I have managed to order the results alphabetically based on the title first then a 2nd alphabetical ordering of the 1st of 2 meta keys "Species". This works great. ...
0
votes
0answers
22 views

WP Query to order posts by multiple meta fields

This question might have an answer already in the forums, however I still wanted to ask it as this is a different more complicated version of the problem. The story: We have 2 meta fields for ...
0
votes
1answer
38 views

Howto: use existing post_meta as options for a different metabox (checkboxes or list)

I want to create an "Employee" Custom Post Type ("Add New Employee") wherein the employee may belong to one or many offices. The user needs to be able to add/edit/delete offices via a separate ...
0
votes
1answer
16 views

Orderby two meta fields not working

Good day. I have the following code: $args = array( 'post_type' => 'property', 'tax_query' => array( array( 'taxonomy' => ...
0
votes
2answers
43 views

WP_Query displaying ALL posts

I cannot figure out why my WP_Query always displays all my published posts regardless of what I put in the arguments. <?php $args = array('numberposts' => 1, ...
0
votes
1answer
44 views

Notice: Undefined index: error and understanding wordpress

I am trying to create custom post types with wordpress 4. I followed a tutorial book called "Buildin Wordpress Themes From Scratch". I am on localhost so debug mode is on. When I try create a new ...
0
votes
1answer
20 views

Data from ajax not updating post meta

I can not update the meta from this ajax. Can someone give me a direction to help me to resolve it. I have a select field. I need to grab his value, make some work with that value and then, add it to ...
0
votes
0answers
31 views

Issue with migration - image connections to posts going awry

I need help with a rather daunting issue that I'm grappling with. I've migrated a client site from one host to another. Everything went fine except for one major issue pertaining to images attached to ...
0
votes
1answer
16 views

Return a single custom post from multiple meta queries

I'm currently working on a widget which returns a single random featured property on a website but I'm having some trouble with my WP_Query arguments. In the backend I have 2 checkbox meta fields ...
0
votes
2answers
38 views

What Is meta_id In wp_postmeta?

I am trying to add some data in WordPress Custom Field and via adding more direct records/data in wp_postmeta table via SQL query. There are four column as mentioned below... 'meta_id' - A unique id ...
0
votes
0answers
29 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 ...
0
votes
2answers
31 views

Custom meta box not saving values of radio buttons in Wordpress

I dont know where i am going wrong.I want to save the values of my radio buttons in custom meta box.Here is my code. <?php if (!function_exists('custom_meta_box')) { function ...
0
votes
0answers
26 views

Custom meta boxes ID prefix showing on first category but not others

I've created a custom post type and added some custom meta boxes using this great resource: https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress The problem, I've found, is that ...
0
votes
0answers
24 views

How to add validation / error message while add/edit custom post

I am trying to add error message on custom field in custom post save action But my validation not working. Check my code below. add_action( 'save_post', 'save_event_meta_data' ); function ...
0
votes
0answers
35 views

Auto adding product meta on publish

I currently have this function: add_action('transition_post_status', 'wpse_110037_new_posts', 10, 3); function wpse_110037_new_posts($new_status, $old_status, $post) { if( $old_status != ...
0
votes
1answer
36 views

Twenty Twelve entry meta data - change and move

I'm trying to fix with the twenty twelve meta data. I've started fixing and successfully managed to get the date under the title of the post. Please visit my site to see. One thing I want to do is ...
0
votes
1answer
32 views

How to order posts by the user_login that corresponds to a meta_value (which is a user id)?

I'm trying to create sortable column headers for a CPT list, but I'm stuck on one piece. When clicking on an "Assignee" column head, I want the list to display alphabetically by the login name of the ...
0
votes
1answer
39 views

Plugin can't be activated [closed]

I'm developing a WordPress plugin, but the last changes caused the plugin to stop working. It tells me that I can't activate the plugin because it caused a fatal error. On localhost all is working ...
0
votes
0answers
18 views

unable to access image attributes in wp_postmeta when looping through posts

I have an issue with accessing attributes of a library image, particularly the "Alternate Text" attribute. I use the ACF (Advanced Custom Fields) plugin to pull back the slideshow image which is ...
-1
votes
1answer
66 views

getting image alt text via ACF plugin in WordPress [closed]

I am using the ACF plugin in my WP 3.3.1 application and I use the the_field method in many places across the site. One place in particular I use it is in a slideshow/carousel as below: <img ...
0
votes
0answers
21 views

Permalinks using event date (year & month) instead of publication date

The site http://www.bikefun.org is live and working, but the permalinks are not quite right. It is an event calendar site. Events are stored as a custom post type "bf_events", with dates stored as ...
0
votes
1answer
45 views

Display Posts by Views (Popular Posts Widget)

I am trying to display the most popular posts based off of this, but I don't think it is working properly. When you view a post it seems to add 1 view to each of them, not just the unique ID. ...
0
votes
1answer
68 views

When sending a newsletter -not with wordpress- the server has 100% cpu [closed]

When sending a newsletter (not with wordpress, but with another external newsletter campaign tool) to 3,298 recipients, we have unique opens: 155, the server has 100% cpu from too many httpd instances ...
0
votes
1answer
23 views

Copy wp_postmeta from one database to another

I had a site setup on old-domain.com, which used the database old_db. Recently, we had to migrate our website to a new server and domain, new-domain.com which uses the database new_db. I installed a ...
0
votes
1answer
41 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
1answer
23 views

Is there any way to tell when wp_postmeta has been updated?

I have a website for a client, where users can vote up or down certain things on a leaderboard. The up vote is stored within wp_postmeta as a field. What I'd like to be able to do is see what the ...
0
votes
1answer
39 views

Custom Post Type meta oembed html output resulting in WSoD

For a homepage template I'm trying to query a custom post type with a couple custom meta boxes. They are a title, oembed text field, and text area. I've compiled the below code from various sources as ...
0
votes
0answers
49 views

Storing post meta values in an array

I want to create multiple metaboxes to store some values (for example 10 values). Currently I store them with different keys (val_1, val_2..). How can I store all of the values in a single meta key ...
0
votes
0answers
24 views

Reset postmeta entries every month

I have this currently running on my site, which counts how many times each 'post' has been viewed, adds one view to the count and then saves it in postmeta: function getPostViews($postID){ $count_key ...
0
votes
1answer
111 views

Show value of select dropdown in meta box

I have created a meta box which has a select dropdown list and i want to show it in the post as a user selects a particular option from meta box.I cant figure it out how its done.Here is my meta box ...
0
votes
1answer
44 views

Can't save drop down select date in meta boxes

I want to update my select options(drop down) but i don't know where i made a mistake.Here is my code. <?php function display_post_options(){ wp_nonce_field( basename( __FILE__ ), ...
3
votes
1answer
38 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
58 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
15 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
17 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
17 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
23 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
23 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
79 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
39 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
31 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
88 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
12 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 ...