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

learn more… | top users | synonyms (2)

1
vote
1answer
412 views

Add More Fields to Users Pages (Admin Panel)

So I'm trying to create some custom fields for users. I need to give users access to a 30 day trial of some software and I want to keep track of that in the users page of administration panel. If the ...
0
votes
2answers
48 views

How to get multiple checkboxes in one meta field

I can manage to show one checkbox using woocommerce products custom fields However, I need to show multiple values from multiple checkboxes in my admin area. I have the following code: <input ...
0
votes
0answers
26 views

conditional logic for front-end custom field edits

I'm just starting to learn php/js and would like some recommendations on the best way to setup my logic: Goal- Display the value in a custom metafield in the custom post type. If the user is the ...
3
votes
2answers
699 views

How can I save repeatable fields with one value inside an array?

Introduce I am currently working on a slider plugin to learn a lot of PHP and WordPress. I have create some repeatable field with javascript. Some functional details: When the user is clicking on ...
0
votes
0answers
17 views

Custom post with custom category and custom meta box query and order by custom_value

Im building a Library CPT= Libro Custom Taxonomy= categoria_libro (as category) Custom meta box which has: autor editorial ciudad año As it says in the title, I need to query a custom post ...
1
vote
1answer
1k views

Order get_terms() By Custom Field

I want to order my categories like I order my pages. I've added an extra field called Order to my taxonomy, but how do I order my terms by this value? Adding and Saving my Order Value: /** Add New ...
0
votes
1answer
43 views

Is it possible in WordPress

I am trying to create a ranking based on user donation, my problem is I am not sure if wordpress user meta support append For each Project a user can donate money via paypal In WordPress User Meta I ...
0
votes
1answer
15 views

Change path to child of page when uploading image via custom field

Is it possible to change the path of an image when it is uploaded via a custom field so that instead of appearing as www.mysite.com/wp-content/uploads/2014/05/file.pdf it will appear as ...
0
votes
0answers
8 views

Default Custom Field User Data

I want to create a user meta that would either add or update In the user meta there are two custom field 'projects' and 'amount' so if user donated $1 to project A the user meta will create a row, ...
-2
votes
1answer
458 views

How to include custom field in shortcode (do_shortcode) in theme file

To cut out a few steps and make it easier for authors, I have included a custom field for authors to enter details (may include HTML). I want to add the custom field to a shortcode in the theme. ...
0
votes
0answers
57 views

Conditional logic Advance custom field

i try to use this code to have a conditional logic form some field on back-end on ACF Plugin. I have a select HTML field with si/no (yes/no). If i select no, nothing show but if i select yes appares ...
4
votes
3answers
10k views

How to Add Custom Fields to a Custom Post Type?

Ok, so I have registered a few custom post types and a few taxonomies. Now, for the life of me, I cannot figure out the code I need to add a Custom Field to my Custom Post Type. I need a drop down ...
0
votes
0answers
31 views

Calling Custom Fields within a category loop?

What I'm trying to do is to display a specific category post listing within a page template, showing only each post's custom fields, which must be pulled and included within the following html. What I ...
0
votes
2answers
19 views

How can I hide my section title if there is no data in custom fields?

I wrote this function with a foreach and I'm not able to figure out how to hide the section title if there are no custom fields in $lista. Where should I place the section title? function ...
0
votes
1answer
23 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 ...
0
votes
0answers
17 views

Nested Meta boxes?

I am trying to set up a plugin that will add a meta box to the posts admin page asking one simple question: How many authors will add their 2 cents? The question is in a dropdown with a possible 4 ...
0
votes
1answer
19 views

Is it possible to make one of two custom fields in Custom Post Type UI Required but not the other?

I'm new to wordpress and I'm trying to make a field that either links to a page internally via a dropdown OR a text area for a URL. Obviously I don't want the button to have two destinations so I'd ...
1
vote
2answers
33 views

Get_post_meta() won't return value

Ok guys... I'm sure this is going to be a really easy answer. I'm a complete noob at this. I have a custom field that is supposed to return a link. For some reason, it just redirects me back to my ...
0
votes
0answers
19 views

Wrap URL around custom field checkbox array

I have a custom field of checkboxes for choosing an "Area of Expertise" that was created using WCK (WordPress Creation Kit which I'm using to create CPTs and Custom Fields). I don't know if this is ...
0
votes
2answers
577 views

Save Custom Fields

I am working in a new project using WordPress. I have created some Custom Posts and now I have to relate some custom posts like categories. I created a custom dropdown menu inside the custom posts. ...
0
votes
1answer
19 views

Set Value To Custom Field While Submit

Is it possible to set an automatic value to a custom field while submitting the post in wordpress? When I post I need that this custom field take automatically the first letter of the post title. ...
0
votes
0answers
31 views

Use custom field “date” compared to today's date to display & order post list

I am at a loss here. I have a custom meta field blser_date where the client can use the date picker. The meta field is setup in a meta box array (this may be an issue b/c of the key?) Here is the full ...
0
votes
0answers
23 views

Display custom field in Media library according to a custom type

I have a custom field that follows any picture in the media library. It's added like this: function add_image_attachment_field( $form_fields, $post ) { $form_field["xxxx"] = array( ...
0
votes
0answers
14 views

Add a new tab (beside Just Listed / Most Popular / Random)

Using classipress theme, I need to add a special Tab beside Just Listed / Most Popular / Random based on a special custom field (cp_annonceur) where its value is equal to professionnel. I used below ...
0
votes
1answer
18 views

Can I access Posts of custom-fields via URL?

Is there a way to access all posts where the value of a given custom field is concurrent? like you can access all posts of a category like this: http://yoursite/category/<category-name> so I ...
0
votes
2answers
63 views

Display custom meta box in my template file

Need help displaying my custom meta boxes on a template file. Following a tutorial Here's the code from my functions.php: function get_custom_field( $value ) { global $post; $custom_field = ...
5
votes
2answers
3k views

How to correctly call custom field dates into a posts_where filter using SQL statements

Currently I have the loop listing posts between two dates using the posts_where filter: function filter_where( $where = '' ) { $where .= " AND post_date >= '2000-01-01' AND post_date <= ...
0
votes
1answer
895 views

MySQL Query that looks for post with Custom Field, then changes Category

I'm looking for a MySQL Query that will look for all the posts with custom field "meta_key_I_want_to_find", then if the custom field is detected, add a category to that post. The category has already ...
1
vote
1answer
774 views

Add custom field to image editor

How do I add custom field to the image editor, such as under the image 'Description' field? To be much clearer, it's where the settings for the images are after you upload an image in the attachment ...
0
votes
0answers
36 views

wp_insert_post not working

I'm using WP 3.8.3 + Yoast for SEO + custom fields. Trying to do wp_insert_post due to post migration using the $my_post = array( 'post_title' => $post_tit , 'post_content' => $link, ...
0
votes
1answer
27 views

Extend WP_Customize_Control with Multiple Field Control

I'm trying to figure out how to code a custom control but frustratingly all the information I find online points to the same example of creating a single textfield. I'd like to create a custom ...
1
vote
1answer
49 views

Query Custom Post Types by date (custom field) range

I've seen similar questions and solutions, but so far I couldn't apply it to my code. The following code (functions.php) works perfectly fine: if( isset($query->query_vars['post_type']) ...
0
votes
0answers
43 views

Saving metadata of related post on save_post

here is the scenario: Custom Post Type "shows" Custom Post Type "reviews" Reviews are "child" of shows so that every review has a custom field with the ID of the parent "show". Since a review has ...
0
votes
0answers
25 views

Custom field with image and figcaption

Is it possible to create a custom field with both image and figure caption? I'm looking to add a custom field to the admin so users can include an image with a caption, styled as such: <figure ...
0
votes
0answers
40 views

Complex menu structure with 6 custom post type hierarchy

We chosen to use Wordpress to this client but we have not work with a menu structure like this one on Wordpress. Those content types i what we have created as custom post type. Is listed below: ...
0
votes
2answers
789 views

Excerpt length: get first paragraph

I'm trying to figure out if it's possible to get an excerpt from each post, grabbing the first paragraph from each one. I'm currently using the ACF plugin and have custom post types and custom fields. ...
0
votes
0answers
27 views

Sorting Custom Posts by Custom Field

I'm currently trying to sort custom post types called 'Donors' by the 'County' they live in. I have a custom field setup called County that they can fill in on the Donor post. Is it possible to echo ...
0
votes
1answer
37 views

Get all the posts from the category in a dropdown list in a custom field

In wordpress I have have a custom post type. Lets say it is movies. Inside movies I have a list of posts with different movie name. Now in each post I want a custom field of dropdown. Where all the ...
1
vote
1answer
670 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
32 views

Related post thumbnail not showing up

I have created a 'related posts' custom field and would like to loop through all the posts that are added as a relation and show a bit of info from each (the title, a link and the featured image). ...
-1
votes
1answer
43 views

When I have something on a specifc custom field, how can I show it of the place of featured image? [closed]

I want in the place of the featured image of a post -depending on the subject of the post- , to show shortcodes (example shortcode to put on custom field:[ngg_images gallery_ids="1" ...
0
votes
0answers
32 views

If statement with two custom post type's but showing only one

I'm trying to think of a way to create an if statement in which it checks if two fields from two different cpt's are the same. Is there a way to do that without showing one of the two cpt's on the ...
0
votes
1answer
743 views

How to sort by custom field value?

I am using these code to sort most Commented, Most viewed Posts <?php $params = $_GET; unset($params['orderby']); unset($params['order']); unset($params['v_orderby']); unset($params['v_sortby']); ...
0
votes
3answers
672 views

Display value of custom field not working

I am simply trying to print the value of a custom field. I have read all the documentation, tried out other people's suggestions, and nothing works. I can get it to print the ID #, but not the actual ...
0
votes
2answers
84 views

Multiple instances of TinyMCE are removing <p> tag

I'm using the following code in functions.php to add a TinyMCE box on custom field textareas inside the Editor: add_action('admin_print_footer_scripts','FT_TinymceCustom',99); function ...
0
votes
0answers
31 views

Default gallery returns as shortcode text not gallery from synchronized custom field

I'm using ACF and Polylang plugins. In ACF I have set up a custom WYSIWYG field where I create default WP gallery. Then in Polylang I have set up that it synchronizes this field across languages. So ...
0
votes
1answer
397 views

How do i save and retrieve custom attachment meta?

I'm trying to save if a checkbox inside of the media uploader pop up is checked, so i can retrieve it from the front end. I'm using this code: function filter_attachment_fields_to_edit( ...
0
votes
0answers
107 views

WordPress Front End Profile Upload the User Image

I'm building a website that allows users to register to different groups based on their field of expertise. I have managed to get a profile page on the front but I can't get the user image to be ...
0
votes
1answer
511 views

Display custom widget value in header.php

I am using the code below for a custom widget. I have added some fields in the widget like: Title, Name and a checkbox. Now everything is fine but I want to show those values in header.php. Any idea ...
0
votes
2answers
35 views

Search Results Page - Displaying Custom Meta Fields

For the search results page Im making a custom template. And in that custom template I want to display custom meta field values. However, when I do this: <?php if ( have_posts() ) : ?> ...