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

learn more… | top users | synonyms (2)

0
votes
0answers
13 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
19 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
3answers
17 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
25 views

Custom Post Type Loop inside Array

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
16 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
28 views

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

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"> ...
0
votes
1answer
22 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
22 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
28 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
26 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
30 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
28 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
29 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
36 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 ...
3
votes
1answer
54 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
29 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 ...
-1
votes
0answers
13 views

How to get registered field values attached to a certain page_template?

I am using this to get all pages with a certain page template $pages = get_pages(array( 'meta_key' => '_wp_page_template', 'meta_value' => 'template_aboutMembers.php' )); echo ...
0
votes
0answers
19 views

How to get custom taxonomy ID by custom field value

I have created custom post type products and custom taxonomy cats for this post type. Then I have added a custom field for taxonomy cats named cat_pp_id. Now I need to get taxonomy ID using value of ...
0
votes
0answers
14 views

User Specific Taxonomy Terms

Is there any way that I can program user specific taxonomy terms. The way WordPress taxonomies work is such that if a taxonomy, say "Music Genre" is available on the site, and if one user inputs some ...
0
votes
1answer
30 views

add_meta_box Callback not being called

I created my first plugin last week that makes a custom post type. As this worked, I copy pasted the code I already had and modified it to be a different post type. For whatever reason however, the ...
0
votes
1answer
25 views

Showing custom field contents without listing description

I'm customizing a directory theme and my custom fields appear only if I put some text at the company's description, otherwise it will show nothing... Any idea how to fix that?? I think the problem ...
0
votes
0answers
12 views

Displaying checkboxes custom field as list

I have a checkboxes custom field, and I figured a way to show it as a list, the problem is, the name of the field shows as an item on the list, instead of for example: Items: Item 1 Item 2 it ...
0
votes
1answer
33 views

Price comparison table based on Custom Post Type?

I have created a review site where clients can rate their hosting providers based on various factors, however since the launch, many have asked if it would be possible to create a price comparison ...
0
votes
1answer
13 views

Related query shows same image in loop

I'm using the code below to query all other posts with same value in custom field FeaturedArtists. Works great except the images. All images are the same as the current post. If I change ...
0
votes
0answers
44 views

Meta Compare (EXISTS) does not work

I want to include the posts that have a certain meta_key and exclude those that does not have that meta_key. NOT EXISTS works but EXISTS fails in the code below. function include_meta_key( $wp_query ...
0
votes
0answers
21 views

Add Custom Field to Custom Post RSS

I have a custom post type called "Podcasts" with a custom field called "podcast." The custom field is generated by the Advanced Custom Field plugin. I am trying to figure out how to hook the feed up ...
1
vote
0answers
36 views

How to use pagination with get_post_meta

I have a Products Page that i am using to add products using custom metaboxes this is the code for my page <div class="container products"> <div class="row"> <?php ...
1
vote
1answer
18 views

Admin Custom Meta Box - Pull Last 5 Posts from Custom Post Type

This is what I'm trying to accomplish, I have a custom post type of "demos", from here I can add custom CSS/HTML/JS to display a demonstration (online preview) of what it is I have designed/coded. ...
0
votes
1answer
23 views

Wordpress taxonomy child image

I've set up a hierarchical taxonomy. Each taxonomy has an image field I'm trying to output the title, image and link of child taxonomy on their parent page. I've managed to output the title and link ...
0
votes
2answers
30 views

Custom Post Type Fields

I am very interested in creating a coupon plugin for Wordpress, where many of the existing options do not meet my current needs. I have build the core plugin and it is working as expected now so I ...
2
votes
2answers
44 views

Custom post meta field effect on the performance on the post

I have the posts which have many custom defined meta fields. On posts I am calling them on requirement using get_post_meta. Means for 10 meta fields I am using it 10 times. Am I doing it right? ...
0
votes
2answers
51 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 ...
0
votes
1answer
37 views

Call the latest posts from a custom field group to be displayed on front-page

i have this custom Metabox field group from https://github.com/WebDevStudios/Custom-Metaboxes-and-Fields-for-WordPress/wiki/Field-Types#group containing 3 fields and displayed on the Products page ...
0
votes
0answers
32 views

Post type archive pages with custom query

Apologies if this is something trivial, but I can't seem to get it right and I can't quite find the correct way to tackle this from previous questions. I am building my own theme. I have the normal ...
0
votes
0answers
15 views

Grouping search results in search.php based off on categories AND custom field names

Wondering if it's possible to output search results based on custom field names and categories via search.php file. I tried this: (with two categories) But didn't work for some reason? <?php ...
0
votes
0answers
49 views

Create custom fields/meta data gender+country - radiobuttons and dropdown on register screen for these fields

On register I want the user to select gender (radio buttons) and a country (dropdown from list of countries) as well as an agreement checkbox. I'd also like all of these to be editable on the user ...
0
votes
0answers
25 views

Store input from user into DB

I'm building a simple web application using Wordpress that takes tons of input from the user (text as well as images and video) about themselves and shows that data (profile) either publicly or ...
0
votes
0answers
21 views

WordPress Custom File upload meta box saving 0 bytes as File size

I am trying to save custom images with the custom post type , so i added a custom meta box for file upload . it seems it is working fine but when i upload any file it save the file size is 0 Bytes . I ...
0
votes
1answer
23 views

How do I display posts with specific value in a custom field into my loop?

I'm trying to display posts that contains a specific value from my custom field. For example, I created a custom field that asks for the year, let's say I would like to display only posts with the ...
0
votes
1answer
28 views

post_per_page ignored in WP_Query

I have a custom post type named 'album' and I added two custom fields 'release_date' and 'release_date_us' with the ACF plugin. I'm trying to display the latest albums based in a widget area. The ...
1
vote
1answer
26 views

How can I dynamically add a post to a custom post type which uses a custom field?

I have a custom post type called "patients". I was using only the post title, but now I need to make a relationship with users. I made this by creating a custom post field (created by ACF), a ...
0
votes
1answer
60 views

Sort posts by custom fields value using dropdown menu

I'm trying to sort my posts by a custom field value, called price. Only using numbers in the custom field value. I want that the visitors of the website can sort the posts on price by using a ...
3
votes
1answer
85 views

Order by meta_value_num DESC and meta_value ASC on WP 4.0

I have created a custom post type that I want to order by custom-field-1, which is boolean so its value is either 1 or 0, in DESC order (1 to 0) custom-field-2, which contains text and is supposed ...
0
votes
2answers
19 views

When creating a metabox do you have to create DB fields for the data?

I'm just getting to grips with metaboxes for the first time and after reading up on them one of the main question i have is do you need to specify fields in the DB to store the data got input. i.e. if ...
0
votes
1answer
27 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
28 views

Show custom field if it exists, and show different elements if it doesn't

Basicly what I'm trying to do (with very basic knowledge of PHP): If Custom Field $randomname exists for that particular post, show the content of that custom field. If Custom Field $randomname ...
0
votes
1answer
53 views

CPT Repeatable Fields + Undefined Index

I'm using this code here for repeating fields in a CPT (yes, I know of ACF and a few others), and have tried to add a third field. The field is currently displaying in the meta box, and is output on ...
0
votes
0answers
26 views

Using custom fields globally?

I'm trying to use the value of one custom field on multiple pages and posts. I'm a newbie to PHP and custom fields so what I'm trying to accomplish could possible be done using a different method. I ...
0
votes
0answers
18 views

Custom Field for Individual Pages in Multi-Page Post

I have articles divided into multiple pages using <!--nextpage-->. I need a custom field say mycf holding different value for each individual page of the article. Also, I need a way to update ...