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

learn more… | top users | synonyms (2)

0
votes
0answers
8 views

Pass custom post meta to dynamic page

We do lead generation using the gravity forms plugin for our site forms. Right now we create the marketing page with the form on it, then we create a child thank you page that the user is redirected ...
1
vote
0answers
21 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
15 views

When post is updated, custom metadata in text area field is overwritten

I have set up 2 new post meta fields in order to add functionality to a custom post type. The custom fields generally work as expected, with a couple exceptions. I set up a checkbox (called ...
1
vote
1answer
17 views

Display custom post on home page based on a metabox selection

I am trying to display an post to my home page based on a selection. What I mean is in the backend I have a custom post that has a metabox labeled Assign to Home with a drop down that has a selection ...
0
votes
0answers
21 views

Search for keywords in 3x custom fields and post title within a custom post type

I have create a custom search, where it needs to search within 3 custom fields in one custom post type. I am altering a custom search I paid someone to create, but I'm trying to learn from this an do ...
0
votes
1answer
56 views

add_action and remove_action if custom field exists

I know this may be off-topic as it has to do with Genesis (a premium framework), but with general WordPress, this has to do with running a remove_action and an add_action depending on if a custom ...
0
votes
0answers
11 views

Use A site wide variable in multiple pages content [on hold]

Let's say I have a wordpress site with two pages. On both pages I have a irregularly changing piece of information. For example the color of the shirt I am wearing at the moment. I most likely do not ...
0
votes
0answers
16 views

Increase a field's data length to store longer password hashes?

I'm trying to implement a common password hash which uses the methods from this project I've managed to create a plugin and C# application which are able to validate password hashes in the same way, ...
0
votes
0answers
7 views

Meta Box size issue. How to resize it properly?

I cant figure it out how to resize meta box . I did try to add something like rows="5" cols="60" but no luck. With width and height box resizes but when text fills the box it continues to the right it ...
0
votes
1answer
26 views

Let user to add input fields on theme option page

I'm creating a Theme Option page for my own wordpress theme and I've been trying to create something like this on my option page It means my user(admin) can add any number of input fields (in this ...
0
votes
1answer
13 views

Creating post custom field text area

I want to make, I guess a custom field for my theme. I'm not sure is it the right way to do this with custom fields. I searched a lot, but could not find what I need. So I'm hoping that some one ...
0
votes
0answers
29 views

get_the_ID() fails the first time, returns a value the second time it's called

I'm using get_the_ID() when creating an email. The first time that an email is sent using a post for the content, get_the_ID() returns nothing. If I resend an email with that same post, it will ...
0
votes
1answer
26 views

Updating ACF field with external data

For our articles on our Wordpress site, we would like to display article analytics that are collected weekly for each manuscript. We have these native custom fields for each post: Article Views PDF ...
2
votes
2answers
70 views

Can wp_query return posts meta in a single request?

I would like to create a wp_query that would return posts meta inside the posts array. $args = array ( 'post_type' => 'page', 'meta_key' => 'someMetaKeyName', ); // The Query $query = ...
-2
votes
0answers
10 views

Adding Order Meta Woocommerce [closed]

I want to add in the backend of an Order a custom field next to Qty, in which i wanna save a custom code (let's say a serial number for an item, so i need a textfield). I need the textfield to be ...
0
votes
1answer
12 views

Building a Portfolio and need some direction

I'm still new to WordPress so bear with me. I'm building a portfolio in WordPress and one of the goals I have is to display individual work items by type: website, print piece, video, etc… But ...
0
votes
0answers
9 views

Search form/Search results for Custom post type and its associated custom fileds

I have "Courses" Custom Post Type and few custom fields linked to each post type. Custom fields like Course Id Category Course Title Languages Month Year Duration. I am new to this Custom post ...
0
votes
1answer
66 views

Display Child Page with custom fields within Parent Page

I have a parent page with multiple Child Pages. On the child page template I have an include which has customfields. This works perfectly. The custom fields are on the child page in wordpress. The ...
0
votes
2answers
36 views

How to display custom field value on page?

I have added custom fields by clicking on screen option and mark custom field ,how to display custom field value on page?
0
votes
0answers
11 views

Getting post IDs for update_post_meta

I'm already creating multiple posts using class PostController. I'm trying to get my post IDs dynamically into update_post_meta. I'm including the class file and running the function using ...
0
votes
0answers
26 views

Adding custom fields to WordPress_PostController

I've exhausted all of my searching efforts, so I'm hoping I can get some help. I am trying to add custom fields for multiple staff members using foreach and variables. I am using HarriBellThomas's ...
0
votes
1answer
12 views

If category then echo a custom fields

On a bog standard single.php file how can I echo the following if the post category = "Events" or category ID '4'. The code I'm looking to echo is : <div class="event-post-icons"> ...
-1
votes
0answers
22 views

Custom Field button text

How can I have editable text for a link button, that's been made with a custom field? <a class="big-btn" href="<?php echo get_post_meta($post->ID, 'big-btn', true); ?> ...
0
votes
0answers
11 views

How to disable 'enclosure' custom field link from appearing in the post

Seems like there is no way to delete the custom field 'enclosure' (if I delete it in a post, as soon as I press update it will appear again). OK, but how can I remove the link to the video file ...
0
votes
1answer
19 views

get_post_custom stripping styling issue

I found this thread: Paragraphs removed when using get_post_custom()? Was hoping someone could either help me a little more though.. My code: <?php $post_customs = ...
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
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 ...
0
votes
1answer
22 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 ...
-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
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 ...
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 ...
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
23 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 ...
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
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
39 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 ...
-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() ) : ...
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"> ...
-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
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 ...
0
votes
1answer
49 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 ...
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
2answers
128 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
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
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
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
84 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' ...
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 ...