Custom Fields are fields that can holds arbitrary extra information known as meta-data.

learn more… | top users | synonyms (2)

1
vote
0answers
7 views

Get Meta from Custom Field of Image URL

I have a custom field that is an Image and the return value of the field is Image URL. I have custom page templates where I render these image fields. Is there a way to get the meta info for the ...
0
votes
0answers
11 views

WordPress loop by three meta values with random order

We have three custom fields with names plan_name1,plan_name2 and plan_name3. Need to check if these meta keys has values (1,2,3) OR (2,3,1) OR (1,3,2) OR (2,1,3) OR (3,2,1) OR (3,1,2) We mean ...
0
votes
1answer
14 views

Display list of my_terms having same custom field

i have custom field for my taxonomy called 'food_type' How to Display list of my_terms having this custom field with "Cat food" value
0
votes
1answer
20 views

How to Duplicate (multiple meta box)?

I've made a meta box field which works nice, but now i need to add one more. For the past few hours I've tried to mix every piece of it, to duplicate it, take some parts, google, search, and no luck. ...
0
votes
1answer
579 views

SQL / wp_update_post: change post custom field to CPT post taxonomy

the setup is as follow: I have posts with a custom field: actor = 'tom hanks' for advanced management I created a custom post type (actors) and added "tom hanks" as a post within that actors taxonomy. ...
1
vote
1answer
17 views

How to display submenus on page based on referring top-level parent?

I am trying to display a secondary menu on pages that displays all the coordinating sub-pages of the top-level menu item they navigated there from, but my issue is that some pages appear under ...
-1
votes
2answers
29 views

Assign class to Drop Down Selections in WooCommerce Products Custom Fields

I have added a drop down to the WooCommerce Inventory Tab where the user can choose message to show in front end. In functions.php: // Display Fields in Back End add_action( ...
0
votes
1answer
19 views

Update field name without losing the value

So I have this photography website using ACF with flexible content. It has approximately 300 posts. Due to requirements, I need to update the name of some fields. I've tried the following query: ...
0
votes
1answer
452 views

Order custom fields alphabetically

I've been trying to order the custom fields alphabetically, but I can't get the ordered list I want... this is the code I'm using: <?php $vMarca = get_field('tienda_marcas' , false, ...
0
votes
2answers
2k views

Get image post ID in media upload

I am developing a plugin that adds a Custom Post Type to my theme. It's a retail directory and the post type is a retail listing. Everything is working fine. I can upload content to the DB and then ...
0
votes
1answer
394 views

How to sort category by custom field value

I am using the following : $catargs = array( 'meta_key'=> 'category_custom_order', 'orderby' => 'meta_value_num', 'order'=> 'ASC', ); but I can get the ...
0
votes
1answer
768 views

Sort posts by custom fields value using dropdown menu

I'm trying to sort my posts by a custom field value, called price. Only using numbers in the custom field value. I want that the visitors of the website can sort the posts on price by using a ...
0
votes
1answer
12 views

Login_form add to top of form rather then bottom

I have added a 3rd field on the login page, but it shows at the bottom(underneath password) while I would like it to show above Username. How can I manipulate the order of fields? This is the code I ...
0
votes
1answer
465 views

get_post_meta fields don't show up on posts page

I'm new here, and to coding! I've been working hard (so, so hard...so hard) to create my website and with occasional help I've created a look and feel I like using some custom get_post_meta fields for ...
0
votes
2answers
431 views

Bulk edit custom excerpt text in WordPress

Is there a way to bulk edit the custom excerpt text without going to each post and open it? When we have 300 posts it can be a very time consuming process.
0
votes
2answers
956 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 ...
2
votes
1answer
898 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: ...
0
votes
1answer
500 views

change attachment custom field onChange event

The form is in post creating window. Ajax is posting values, but the values doenst renews. Where can be problem ? Ajax <script> function dynamic_Select(field, aid, value) { ...
0
votes
2answers
618 views

Woocommerce custom fields

I'm using woocommerce plugin in my wordpress web site. In Admin panel for products I've added few custom fields as shown bellow: On my shop page, I want to print the custom field values, and I use ...
2
votes
2answers
1k views

Matching Serialized Arrays with meta_query

I've asked a related question previously, but I think I've finally worked out the crux of my issue. I'm using Advanced Custom Fields and have a number of custom fields attached to my post type. I'm ...
0
votes
1answer
15 views

Auto populate custom fields by post date

I have an old blog with lots of posts, I created 2 new custom fields "Year" and "Month" using ACF. I would like to auto populate them from the post date after post save/update, is this possible ? ...
0
votes
1answer
24 views

Problem with saving large amount of data in postmeta/usermeta

I am facing issues saving large amount of data in post meta field e.g. I have created a field Bio/description and put a huge amount of text in it. Now when I save it, it saves some of the text and ...
1
vote
1answer
659 views

get_post_meta unserialize issue - retuns boolean(false)

I´m using a simple custom plugin that parses and saves external XML data as a serialized array in a custom field. This works fine, however, when I update the post, instead of the array I only see a ...
0
votes
1answer
28 views

meta_query 'compare' => '!=' not working

I am using a custom post-type, in post there are a checkbox meta field for featured post. So there are two scenarios. First with featured posts Second with non featured When I called featured ...
0
votes
0answers
15 views

How to add custom meta box to Quick Edit? [on hold]

I have custom post type imggal. I want to add custom meta box imggallink to quick edit and can't find any right info for it. How to get it? Help please. I try to add column function ...
0
votes
0answers
24 views

Update custom fields after updating related custom field

I have a custom post type that I'm filtering by a custom field, I then select one of these posts & update it in the front end. But when this is updated, I need to also update the other filtered ...
1
vote
0answers
23 views

Add additional 'description' field for defined roles / role metadata?

Is it possible to add an additional field for "description" to each defined role? (Administrator, Editor etc, plus custom roles). I'm using Justin Tadlock's Members Plugin and have created some ...
0
votes
1answer
32 views

How to display custom field in woocommerce email orders? [closed]

Am having trouble showing custom field data from a select drop down in the order email form in Woocommerce. The data is showing in the admin page order just not email? add_action( ...
-1
votes
0answers
22 views

wordpress permalink with specific meta value and custom post

One Client want to manually add permalink in page.php .. Something like this <a href="?post_type=wprojects&year_built=2016">Projects 2016</a> And when somebody click on this link it ...
0
votes
2answers
455 views

Include custom fields into the content of a regular page

Here's my setup: Parent "Gallery" page: _regular page, not custom type or anything _ Several "Project" child pages (could be as few as 1, unlimited number): also normal pages Child pages will ...
0
votes
1answer
458 views

Media Attachment Custom Meta Fields not saving in Media Uploader when using jQuery UI Autocomplete

I am trying to write a plugin that adds a custom meta field to image attachments to give images a credit field. I use the 'attachment_fields_to_edit' and 'attachment_fields_to_save' filters. ...
0
votes
3answers
2k views

unlink() doesn't delete the uploaded file

I'm using this code in my plugin to add an extra field to the user profiles so that the user can upload an image. It uploads the file perfectly but the only problem is the part that has to delete the ...
0
votes
2answers
449 views

Custom search SQL Query to add custom field in result

I have to write my own MySQL query since I haven't found a good way to do it within wordpress functionality. I want the search query to search trough post_title / post_content & meta_key ...
0
votes
1answer
1k views

How to delete file uploaded by Plupload

I follow the steps from here to integrate the plupload in metabox. Everything is working fine. But I did find one disadvantage of this guide. When I click the 'Remove' link from the uploaded images, ...
4
votes
1answer
55 views

How to use custom fields in post title?

Certain posts of mine will have the custom field release_author in them - others don't. If that field exists, I want to display that in the header.php's title (not in the h1 of the post itself. ...
0
votes
1answer
2k views

Let users upload image(s) to the post from front end

I want to enable logged in users (Wordpress) to submit posts from front end (among with other data). My form is working great, I add custom post meta data which I later display on custom post page. ...
0
votes
0answers
18 views

Extend Metabox.io map field to sepearate lat long values

I am trying to separate the latitude and longitude values returned by the map field from the metabox.io plugin and save them as separate values. I have found a comment from the author (shown ...
1
vote
1answer
45 views

Update custom field values on edit address page woocommerce

I have two custom fields included in the checkout page and also in the edit address page in myaccounts of woocommerce. The problem is the two custom fields 'billing_door' and 'billing_flatname' are ...
0
votes
1answer
440 views

Guest Author - How to display posts on /author/ archive page

I have used the Advanced Custom Fields plugin to create all the data elements for a company leadership directory page and management bio pages. On the site blog, management will not be posting ...
0
votes
1answer
598 views

get posts where a custom field contains a text

I have a custom field where the value contains a comma separated list of items (like: test1,test2,test3), now I want to retrieve posts where the field contains one of the values, I have: $query = ...
-1
votes
0answers
15 views

Add filter to custom fields in functions.php

I've created a custom field named "colors" that i want to put values like {R}. I have a plugin that has a function dad_clothes and at the end adds that filter in order to work in posts content: ...
0
votes
2answers
27 views

Get custom term meta problem on single post type

I'm trying to display a custom field value added to custom taxonomy on single custom post type. I have articles post type with custom taxonomy called issue. I used the code from Tax-Meta-Class to add ...
4
votes
1answer
105 views

Wordpress 4.4+ : How to revision CPT + metadata

In WordPress 4.4+, how do you enable revisions for Custom Post Types along with their metadata? How can you get this information to appear in the diff view? I've attempted to implement what was ...
2
votes
1answer
619 views

How to put enctype=“multipart/form-data” in categories form?

I had success putting the code below to include enctype (for images) in custom post type forms, but I'm not able to use it in categories form... is this possible? Thanks. add_action( ...
0
votes
0answers
10 views

List posts that are geotagged within a certain area

I'd like to geotag some post on WP with latitude and longitude in a custom field. It's very easy to show a map with this data but what if I want to show all the posts that are geotagged, let say, in a ...
1
vote
1answer
930 views

Auto Populate Custom Field with Complex Value That Increase by One?

Can somebody help me to sort this? I am using WP 3.5.2 and I have "Orders" post type where purchase_order custom field is located. This is the sample of purchase order record: POCOS20130051 PO - ...
0
votes
1answer
23 views

Is it possible to retrieve all posts with a certain value for metadata?

Under 4.5, I have posts with meta_key as series and meta_value as 19, 20, etc I am trying to loop through them in a template, and I guess I'm a special kind of dense. Most recently I have tried ...
1
vote
2answers
2k views

Getting Custom Fields from WordPress JSON API

I'm using the plugin (https://github.com/WP-API/WP-API) to get JSON Data from WordPress, but I'm stuck on something, I've a custom post type, events, with which many custom fields is attached to, such ...
7
votes
5answers
10k views

Prevent post from being published if custom fields not filled

I have a custom post type Event that contains a starting and ending date/times custom fields (as metaboxes in the post edit screen). I would like to make sure that an Event cannot get published (or ...
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 ...