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

learn more… | top users | synonyms (2)

-1
votes
2answers
1k views

Integrating WordPress Content into a jQuery Slider

I have a pretty basic 'featured-list - image slider' implemented above my content in my custom WordPress theme. How do I integrate WordPress content into the slider so that the slide content is pulled ...
0
votes
2answers
720 views

Get single image from custom fields made with WCK custom fields creator

I used WCK Custom Fields Creator to create a repeatable custom field for uploading pairs of images (one color, one black and white) to posts. So for example, one post may have three fields, with two ...
0
votes
1answer
879 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 do found one disadvantages of this guide. When I click 'Remove' link from the uploaded images, it ...
0
votes
2answers
361 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
15 views

How do I use foreach to get content from a custom-field in multiple posts?

so I am trying to use a foreach to pull content from a custom field in multiple posts, but it just wont work. I can get it to work for a simple textarea string but I am struggling getting it to work ...
0
votes
2answers
315 views

Wordpress custom upload field error

I'm creating a custom upload field for a wordpress theme that uploads pdf files.The code is: function custom_news_meta_box($post) { $file_name = get_post_meta($post->ID, 'file_name', true); ...
0
votes
0answers
26 views

Custom post type in theme page

I am having a problem with a website I'm currently working on. I am using the theme Html5-Blank by Todd Motto and Advanced Custom Fields for the content. The problem is this: I am using a custom post ...
2
votes
1answer
353 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
1answer
199 views

After moving my site from a dev subdomain, to root, all my custom meta data is gone

I just movde my site from a dev subdomain, to the root. I have extensive amounts of data saved in custom meta fields which I created with the WpAlchemy class. All of this data is not appearing in ...
0
votes
1answer
42 views

Custom field and category query

I have created custom .php file that should show list of all posts that correspond to user's choice. I have 3 custom fields and 1 category condition. I've tried all the queries i could possibly find ...
1
vote
1answer
46 views

Add custom fields to search

I want to add a custom fields ("introduction" and "ensavoirplus") to search of Wordpress, but the SQL code is not exact. I don't understand if i do a mistake or if WP don't can do this. But my attempt ...
0
votes
0answers
10 views

How to make list of checkboxes based of number of distincs value of some custom field?

I need to make list of checkboxes based of number of distincs value of some custom field (Country) for visitors able to choose only post where this field Country the same as they are interested one. ...
1
vote
2answers
846 views

Added 20 Custom Fields. Only 10 showing in drop down

Just like the title states. I've added around 20+ custom fields into my wordpress site and only around 10 are showing in the drop down. The custom fields are all functioning fine on the site side, ...
0
votes
1answer
348 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 ...
1
vote
0answers
25 views

More efficient to add content to custom fields or the content area?

I often build themes that handle a lot of text content. I use Advanced Custom Fields to create several custom field areas per page for adding this content. I've also used themes with page builders ...
0
votes
1answer
44 views

Sorting posts by custom date fields (non standard date format)

I've inherited a website with a post type courses that has a custom field 'date-start', a Date Picker. Unfortunately the date start is stored as 'ddmmyy' and the ACF documentation implies that this ...
0
votes
1answer
27 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
317 views

How can I output the custom fields wrapping with HTML

I am trying to publish custom fields created using the plugin "Advanced Custom fields". I am able to display them on posts and custom post types as raw output. But I want to wrap html around the ...
0
votes
2answers
795 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
85 views

How to add upload field in a custom taxonomy?

I have a custom taxonomy and I want to add a custom field inside , OK that's seems to be easy but the hardest part is when I want to add a file input type the enctype="multipart/form-data" I ...
0
votes
1answer
15 views

Search posts missing a particular custom field

I am trying to search for posts that do not have yet set a particular custom field. The problem is that query down below returns an empty result. $args = array( 'post_type' => 'post', ...
2
votes
2answers
498 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
4answers
9k views

How to use query_posts() with a date filter on a custom field?

I have defined a custom post type that uses a meta field to store dates. In my functions.php I have the following code which saves the start date. The format of the date that is sent in the startdate ...
1
vote
2answers
2k views

Get value in custom field with taxonomy

I have custom field my_cf for Taxonomy/Term. How can I get and output value with custom field for taxonomy/term? I've tried using: $variable = get_field('my_cf', 'basic'); echo $variable; ...
2
votes
1answer
287 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 ...
-1
votes
1answer
341 views

Query posts by Custom Meta (checkbox) & Genesis Grid Loop

I've been trying tons of things for the last 2 days. I'm at a standstill now. I read a ton of posts here but nothing has worked yet. I have a CPT 'artists'. This CPT contains a custom field ...
1
vote
1answer
556 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
1answer
306 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
2answers
476 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
1answer
284 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
1answer
292 views

How do I exclude posts by custom field value?

I need to exclude posts that have a custom field 'city' value of 'Melbourne'. After much searching I think the solution might consist of 2 parts. In functions.php : A function to get the post IDs ...
0
votes
0answers
17 views

Custom permalink parameter isn't enforced

I'm trying to create a custom permalink for my posts based on a custom field. I'm most of the way there but I'm struggling with the last part. My goal permalink structure is as follows: ...
0
votes
1answer
277 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 ...
1
vote
1answer
49 views

How to associate 2 custom fields together (date & price for instance)?

On my website you can purchase a trip after choosing the departure date (among the available departure dates). In the back-end, a trip is a CPT in which departure dates are specified through "Repeater ...
0
votes
1answer
642 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
0answers
21 views

Custom searchfield autocomplete

I have tried to fire an autocomplete on a customized search field but to no avail. I have used some codes from help sites but I really do not know what I am doing wrong. Nothing happens when I type a ...
0
votes
1answer
22 views

Why is wp_list_pages altering $post->ID of the page?

So I have a template that is used for all pages in a section that has this script to create a menu based off children: <?php if($post->ID = 142) { $children = ...
0
votes
2answers
854 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
26 views

Empty the_content for all posts

I'm moving everything that is displayed with the_content in custom fields and i want to remove/emtpy the content of the post_content column in the database, for every post. Is there a mysql query ...
1
vote
3answers
291 views

Title and post URL based on custom fields?

I have custom fields in my custom post type. They should serve as a title and post slug for URL. Basically, whenever I change the content of the custom fields, the title field should react ...
0
votes
1answer
16 views

Show custom field on attachment page?

I use this code to show custom field value outside loop on post page (single.php): <?php echo get_custom_field('my_custom_field'); ?> But, that is not working on attachment page (image.php). ...
-1
votes
2answers
23 views

Create custom field on post draft or publish?

How to automatically create custom field on post draft or publish with one of several offered values? For example I wish to create custom field named "random_color" with one of potential values: ...
0
votes
1answer
33 views

wp_query with multiple custom fields

My Query is this: $products = new WP_Query( array( 'post_type' => 'ys_product', 'orderby' => array( 'date' ), 'order' => 'DESC', ...
0
votes
1answer
22 views

Get text from user and display it on page

I would like to ask you how can I go about getting text data from user and then displaying this custom per user text on their account page. Can I use custom fields for this? Should I write my own ...
0
votes
1answer
41 views

How to query using a combination of custom_field values?

I need to get posts pertaining to a given category, AND : have the event_start_date (custom field) greater or equal than today's date OR have a event_end date (custom field) greater or equal than ...
0
votes
2answers
438 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 ...
1
vote
1answer
76 views

Add / Update Custom Fields After Select Pictures in Media Window

I just added a button called Add Slider in Add/Edit Post Page. Here's my code in my functions.php : //Add button to create slider add_action('media_buttons','add_my_media_button',15); function ...
0
votes
1answer
58 views

Custom Post type and Custom Field WP_Query

I am developing a site for a client who is a Youth Football (Soccer) Club, with lots of different Teams depending on the abilities and ages of the children. I have added in a Custom Post Type called ...
0
votes
1answer
279 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
2answers
332 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 ...