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

learn more… | top users | synonyms (2)

0
votes
0answers
2 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). ...
0
votes
1answer
18 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', ...
-1
votes
2answers
11 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
0answers
10 views

fill wordpress custom fields with xml-rpc using vb.net

i want to know how can fill wordpress custom fields or seo plugins like yoast or all in one seo using XML-RPC With VB.NET ?
0
votes
1answer
17 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
24 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
1answer
39 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
0answers
15 views

Auto create child post from custom field?

I have a custom post type that has 3 custom fields. If I create a post with data filled in those 3 custom fields I want it to auto create child posts for each custom field & using the data from ...
0
votes
0answers
14 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
1answer
34 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
16 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
20 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
28 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
58 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
17 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
33 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
16 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
30 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
75 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 = ...
0
votes
1answer
13 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
14 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
73 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
38 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
28 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
14 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
14 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
21 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
27 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
23 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
39 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
32 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
24 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
76 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
44 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
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
38 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
34 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
26 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
52 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
159 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
31 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" ...