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

learn more… | top users | synonyms (2)

0
votes
1answer
26 views

shorthand syntax for custom fields

I'm trying to write a shortcode and am sorely out of practice with this stuff. It's for a plugin Full Width Audio Player and I'm trying to query all tracks within a certain playlist so it will output ...
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
20 views

Problem in custom meta boxes

I am trying to create a custom meta box "Set your mood" which will display the mood of user but unfortunately meta box is not saving value. Please help This is my code <?php /** * Adds a box ...
2
votes
2answers
460 views

Add custom field to existing meta box?

First off, I have been able to successfully implement custom fields within a custom meta box in Wordpress. I understand how this works. My question is, is there a way for me to add a custom field to ...
2
votes
1answer
332 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( ...
2
votes
1answer
267 views

Unable to save datetime custom meta field using update_post_meta() function

When I do something like this (in my plugin function inside WP admin): $metaboxes = get_post_meta( $post_id ); echo "<pre>"; print_r($metaboxes); echo "</pre>"; die(); I get all my ...
0
votes
1answer
293 views

Filtering custom post type on a combination of custom taxonomies and custom fields?

I have a custom post type "artist". It has an associated custom taxonomy "artist_type" with terms "voice", "actor", "corporate" An "artist" also has custom fields for gender, location, agerangefrom ...
0
votes
1answer
31 views

Thirtieth century date for a post

I want to break the date mechanism in Wordpress. I need to have dates set in the 30 century, controlled through the regular post, but only for one category. To give an example I'd like a post dated ...
-1
votes
1answer
22 views

Send checkout page custom field in order email

i have added option box custom field in checkout page using bellow snippet hook's and function.when user order the product that option box custom field value displaying in backed admin panel but i am ...
0
votes
1answer
322 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
2answers
416 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
0answers
23 views

How to add an if statement for one of the custom fields on the following loop?

I have a bunch of custom fields on one of my post types, that is displayed randomly but in a fixed order. The names of the custom fields are always the same, and for every loop there is an increasing ...
-1
votes
1answer
31 views

Can't sort custom column on user.php by number / meta_value_num?

Everything else works fine but it's still not sorting by number. Would just like to know what I'm doing wrong here Here's the code function add_user_columns( $defaults ) { ...
0
votes
1answer
266 views

Display MP3 as media using an URL from a custom field

I created custom field and placed this inside the loop: <?php echo get_post_meta($post->ID, 'ses', true); ?> But now the link is all text. I would like it to be like my theme does when I ...
0
votes
0answers
23 views

Wordpress WP_Query post__in

I try to get value from database==> postmeta ==> Meta value : value Using this code $promo_value = $wpdb->get_results("SELECT meta_value FROM $wpdb->postmeta WHERE meta_key = '_product_id' ...
0
votes
0answers
22 views

JSON API - custom field as an image

I am returning all my recent posts of a custom content type 'myfriends' in WP with $.getJSON("http://localhost.com/?json=get_posts&post_type=myfriends", function(data) { problem is rather than ...
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 ...
0
votes
1answer
607 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
73 views

Loop through multiple custom fields with increasing number

I have a problem with custom fields that I have been trying to figure out for a while, but with no luck. I have a section on the site I'm building that let's the users publish content form the the ...
0
votes
1answer
478 views

Filter by Custom Taxonomy AND Custom Field

I'd like to give my users the possibility to filter the posts by Taxonomy Terms AND Custom Field values. Like so: [tax]Country:[terms] [tax]Company:[terms] [field]Price:[values] Filtering by ...
0
votes
2answers
807 views

Saving Custom Post types and fields to a custom table

I have a project in which I am trying to import a large amount of data into a WordPress installation and from that data, create pages on my site (as a custom post type). Since these pages will be ...
0
votes
1answer
23 views

How do you turn a custom field's value into a permalink for that post?

I have tried lots of different things with this, and clearly I just don't understand php and hyperlinks enough to figure it out. I'm using this code to output a custom field's value at the bottom of ...
0
votes
1answer
339 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
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 ...
-1
votes
1answer
32 views

Custom Post Type Loop inside Array [closed]

I current have a custom post type loop: $args = array( 'post_type' => 'locations', 'posts_per_page' => 10 ); $loop = new WP_Query( $args ); while ( $loop->have_posts() ) : ...
1
vote
1answer
542 views

How can I display all values of a custom field from posts with a certain value of another custom field or from certain post types?

I know the question is quite ambiguous. Let me explain: I have a page that lists all posts with a certain value of a custom field. (Eg.: The page Rentals lists all posts with the value rental of ...
0
votes
2answers
302 views

Send Multiple Custom Field Values Through the URL

Basically, I'm trying to follow this tutorial to add an action to the pre_get_posts and create a custom meta_query so I can alter the query within the URL and display babies,children and home books ...
0
votes
1answer
275 views

Display posts order by custom post in a dropdown menu

In my WordPress backend I have some custom posts and, in one of them, I want to display in a dropdown field some posts related with but ordered by post type. Iwant to display something like this. ...
0
votes
0answers
25 views

restrict_manage_posts for users?

restrict_manage_posts is great for allowing me to filter posts by taxonomy on the admin page. Is there any way of using a similar function for the users admin page - so I can filter by user meta data ...
0
votes
1answer
37 views

How do I show my <p> containing my custom field ONLY if there is a set value on that custom field? [closed]

I am using the Custom Fields Plugin and have 2 custom fields assigned to my "products" custom post type. Field 1. Price Field 2 Discount Price So this is my code: <div class="wrapper"> ...
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
1answer
1k 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. ...
1
vote
1answer
982 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 ...
0
votes
1answer
417 views

Attach images to posts using custom fields (just paths to images already upld)

I'm setting up a real estate website, which i make listings using a custom post type 'listings' in which I have multiples metaboxes for beds, baths, and all other informations. I use a plugin to ...
0
votes
1answer
23 views

Upload & include specific JavaScript files for posts?

I need to include specific Javascript files on specific posts. This will be done in pretty much every post and each file is unlikely to be included in more than one post. I know I could just upload ...
1
vote
1answer
27 views

Display URL in a Custom Field

I'm using the following code to display several custom fields on my posts in WordPress, but the URL field doesn't work as I want and I don't know how to solve it: $destino_web = get_post_meta( ...
0
votes
1answer
697 views

Custom wysiwyg editor doesn't execute shortcodes?

I encounter this weird problem.. I'm trying to create a simple & easy website for a client. He wants to embed video's into the page. I use different customfields assigned to specific elements in ...
0
votes
1answer
55 views

WP_Query Meta_key is text value and need to sort as numeric not working

I have the following code below in my ~WP_Query`. $args[ 'meta_key'] = 'price'; $args['orderby'] = 'meta_value meta_value_num'; $args['order'] = 'ASC'; The custom field in question has historic ...
0
votes
1answer
48 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 ...
0
votes
1answer
44 views

get adjacent post by meta key and meta value

I'm trying to limit previous/next navigation to posts that have the same meta_value on a certain meta_key. I know this was asked before, but I couldn't pick a working answer. And all that I could come ...
0
votes
1answer
324 views

Transfer taxonomy to custom field

I have a blog with movie critics and I'm using many taxonomies to add some informations about the movies, like director, actors or it's year. Using taxonomies is really useful to display all movies ...
0
votes
1answer
342 views

Bulk move (or copy) from a custom field to the post content?

I need to move (or copy) the contents of a custom field into the main post body, replacing any existing content. I need to do this for a few hundred posts...Is there a quick way of doing this? I can ...
0
votes
1answer
29 views

Get post ID from a link

I will try to explain my issue as good as i can. Please take a look at the following page in my website. We have: The main page Inside the main page there is a "view offer" button The "view offer" ...
0
votes
2answers
123 views

Getting Bootstrap accordion working in Wordpress loop with custom post type (collapsing issue)

First off I am well aware that there is a plugin but I am NOT talking about the BS Short code plugin. I am talking about the actual bootstrap accordion. So here is what I am trying to accomplish, I am ...
0
votes
2answers
39 views

Taxonomy related query not working

For all of my pages I have setup a taxonomy field using the plugin Advanced Custom Fields, for which I can then select as Home category, or something else like News. I am using the default category ...
4
votes
1answer
83 views

compare meta_query in get_posts arguments

I like to exclude certain posts with a custom field. So if my_custom_field_ignore isset AND 1 ignore this post. If it's not set include it. This is what I have $args = array( 'post_type' ...
0
votes
0answers
54 views

custom field meta-box with dropdown/autocomplete

Is it possible to have a custom metabox with the ability to either: enter a new meta_value in a certain meta_key OR choose from a list of the existing meta_keys, from a dropdown/select-box, ...
0
votes
2answers
52 views

Custom Post type as Taxonomy

I have a custom post type "issue" and relationship with custom post type "article". What I want is, to create the issue cpt as a taxonomy for the article cpt, and showing it in article post list. When ...
1
vote
1answer
38 views

Using PHP to read Wordpress Posts

I'm a beginner in PHP and Wordpress and I would appreciate help on project I'm working on. Currently I am using the below code to query a specific post and then echo it's expiration date (expiration ...
0
votes
1answer
36 views

Post counter wrongly increments

What I am trying to do is to create a simple function to display the post's view (hit) count. So each time the page is loaded, a variable will automatically increment by 1, and persisted via the ...