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

learn more… | top users | synonyms (2)

-1
votes
1answer
368 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 ...
0
votes
2answers
124 views

Custom fields driven site. I want to make a visual editor driven page template. How?

My company had a website developed that is entirely driven by custom fields. We're now discovering that we didn't anticipate the need for pages with custom layouts, the kinds that can be made on case ...
0
votes
2answers
115 views

Targeting categories in custom fields

I was hoping somebody could help me out with custom fields. I created a custom post type called game-type in WordPress. In this I have the categories "Android", "iOS" and "PC", then within these I ...
0
votes
1answer
362 views

Custom metabox not working

Morning! I have a call in my functions.php file to include a custom meta-box php file in my theme's directory called: /metaboxes/home-meta.php The code is as follows for the call: add_action( ...
0
votes
2answers
857 views

How to load php file for specific page in admin?

Hello and thanks for the guidance! Trying to load a custom .php file for only my home page (template is page-home.php) by using this code: add_action('admin_init','load_home_meta'); function ...
3
votes
2answers
587 views

checkbox in post add/edit to add/remove the post from menu

Introduction: I have created several post type for my theme. To display a post from a post-type I need to go in appearance/menu and then add the post manually. My Goal: I want to add two radio ...
0
votes
1answer
279 views

How do i get a specific user metadata using custom metavalue outside of wordpress?

I need help. I need to get a user ID or email (email is can do but ID is better) based on their phone number, outside of WordPress. I already have their phone number in a variable and billing_phone ...
0
votes
1answer
209 views

A meta box (in a custom post type) with two different type of fields

I want to make a meta box (in a custom post type) with two different type of fields: Text and select, (maybe put it in array ?) and display this meta box with this two fields with a single ID ...
2
votes
1answer
422 views

order by meta_value serialized array

Hi I'm trying to pull posts using the wp query. Just one problem--I am trying to sort the posts alphabetically by a certain meta_value. Thing is that this meta_value is a serialized array. Is there an ...
1
vote
1answer
1k views

Checkboxes in registration form

I want to use checkboxes on registration form, but values are not storing in the profile page. here is the code on functions.php <?php add_action( 'show_user_profile', ...
1
vote
0answers
243 views

$form_fields from attachment_fields_to_edit returning empty array

I'm trying to remove the caption field from non-images attachments' edit page, which should be a simple matter of unset($post['post_excerpt']), but I can't unset a non-existent value... Looking at ...
1
vote
1answer
271 views

Better Method for Multiple Meta Boxes

I'm learning about meta boxes and have gotten them to appear on my local dev, but I can't figure out how to avoid creating new functions for saving multiple meta boxes. I assume that I could call an ...
0
votes
1answer
363 views

How to show custom field and parent post id in wordpress attachment page (image.php)

I'm trying to use code to show custom field outside the loop in wordpress attachment page (image.php) it's returns nothing. this is the code i'm used to show the custom field: <?php global ...
0
votes
2answers
479 views

Exclude custom post type from search by custom field value?

I've been unable to find anything on how to do this, or if it's even possible. What I want to do is not display results of search in custom post type "resources" on which "resource_usertype" (key) is ...
1
vote
1answer
155 views

Execute js files doesn't seem to work

I have developed a website that uses the "Royal Slider". The post loads custom fields from the database without a problem and loops through the images and create a lovely slideshow as can be seen at ...
-3
votes
2answers
129 views

How can i put a custom field inside this php

Hy, i want to count years of an actor. The date that actor is born is stored in a custom field. $date = get_field('data_nasterii'); Date stored in custom field is : yymmdd How can i stick bouth ...
1
vote
1answer
819 views

Add custom field to all posts in specific category

I want to bulk add a custom field (category) with value (photography) to all posts in a specific category (photography, with Category ID 5). I have used the code below to bulk add a custom field to ...
2
votes
2answers
4k views

Populating meta box with select-list of existing posts, and assigning it to custom post types

My question is partly based on this answer: http://wordpress.stackexchange.com/a/5778/27135 Mike's answer is really great, and the solution worked fine until I needed to include my meta box in a ...
0
votes
2answers
1k views

Create ul list in Custom Meta Box?

I need to create an ul list in a Custom Meta Box. The content/text area of the post is already taken up with other information. Is it possible to create another text area like WP built in one so I ...
1
vote
1answer
966 views

Arrange custom fields with drag and drop?

I am making theme for hotel and i made custom metabox with list of various custom fields that i would need in posts. What i did is i made a list of fields like booking wifienabled coffe pool spa ...
1
vote
1answer
347 views

Getting movie and serial on actor page

I'm building a cinema site, I came with a problem, let me explain: Movies- are stored in Post's Actors- are stored in Post Type - persoane ( taxonomy= lista) Serials - are stored in Post Type - ...
0
votes
1answer
2k views

Run Function if Order Meta Exists - WooCommerce

If a checkbox is checked, it saves a value of 1 for a 'my_checkbox' custom order field in WooCommerce. I'm editing the order admin table and I need to be able to echo a particular icon url if the ...
0
votes
1answer
110 views

$TBA Getting Translated to $0 (Custom Fields)

I'm working on a products showcase website, and in my index I have this snippet of code for my two variables ($price for the price, $buynow for the URL) <div class="buyitnow"> <?php global ...
1
vote
1answer
79 views

Query Posts With Over 1000 Views

The code below is from this link. It basically creates a hit counter, but I'm probably gonna have to do this by IP. How do I make a WP_Query, where only posts up to 1000 views can be seen on the ...
1
vote
1answer
487 views

How do I display a custom field from a custom taxonomy in single.php?

I know that the following mysql query produces the exact results I wish to echo within single.php: SELECT meta_value FROM `wp_taxonomymeta` WHERE `taxonomy_id` =565 AND `meta_key` LIKE 'baseurl' ...
0
votes
1answer
739 views

Textarea type on one field custom add_meta_box?

i got close solution for this question from this link "How to add a textarea to only one of the fields of this custom metabox?", but with different code and he use new metabox, i need to see value on ...
3
votes
1answer
1k views

Auto sort the wp-admin post list by a meta key

I am using this following code in my functions file to hide and add some custom columns to my post-edit screen in wp-admin. I am now trying to get the post list to sort by a post meta field (last ...
2
votes
1answer
2k views

WP Query group/order by category name

I have a requirement for displaying a list of custom post types grouped by category, but in addition to this, each custom post is linked with a meta value (in this example lets say we have a custom ...
0
votes
1answer
2k views

query posts and custom post type with meta key

I'm trying to query all-in-one-event-calendar's custom post type ai1ec_event and normal wordpress posts in a slider on my home page. That works pretty well. Now I want to query only the posts with ...
3
votes
2answers
955 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 ...
2
votes
1answer
2k views

Advanced Custom Fields query

I have, hopefully easy question. I have my query here, which is using ACF <?php query_posts(array('post_type' => 'our-clients-list', 'posts_per_page' => 1, 'order' => 'DSC', 'orderby' ...
3
votes
2answers
129 views

Query meta field using between

I'm trying to Query some lattitude and logitude and then I get some long numbers and apperently the Query dont like that. Let says I have these in the database Meta-key: lat Meta-value: 54.3415000 ...
0
votes
1answer
495 views

How to show animal lineage/pedigree in WordPress?

I need to show the pedigree or lineage of an animal in my wordpress site. Currently I have the animals set up as custom post types, with data inserted using the amazing Advanced Custom Fields plugin. ...
1
vote
1answer
3k views

Filter results with custom field values and dropdown

I need to filter posts by a custom field value. My specific example: User browse to products > category 1 > subcategory A. ALL "subcategory A" items (products custom post type) are displayed as ...
0
votes
1answer
45 views

Custom fields issue [closed]

I installed the plugin Advanced Custom Fields and created few custom fields , but I'm not able to add any content in it. How is this done?
1
vote
1answer
437 views

Facebook social publisher and custom post type fields [closed]

I have a problem with how Facebook plugin shows my WordPress-based posts on my timeline. What basically happens is that the post image isn't shown. Now, the post image I want to show is a custom ...
-1
votes
1answer
227 views

How to get lowest price from custom fields of posts

Here is my Code. It is get sub category from main category. and from sub category having different posts related about different products. Now issue it this that i want lowest price value from ...
1
vote
2answers
2k views

can you set a default value to a custom field

I'm looking to set a default value to a specific custom field, in case the client doesn't add into the custom field it already has a specific number associated with it. one step deeper, I'd like it ...
2
votes
1answer
1k views

Saving Custom Field in Attachment Window in WordPress 3.5

I'm using the code below to add a custom text field in WP 3.5 Attachment Window (from this question # Expanding new Media Uploader in WordPress 3.5) ... add_filter( 'attachment_fields_to_edit', ...
1
vote
1answer
64 views

How to combine custom fields to make one order-able value

I have three different custom fields, for day (01-07) hour (01-12) and minute (00-59) and I really need to combine them into one custom value so I can actually order them using wp_query. I cant ...
0
votes
2answers
832 views

Insert wp gallery shortcode into custom textarea

Is there a way to insert wp gallery shortcode into custom metabox textarea ? I would like to have something like this: New metabox in post/page with textarea and below textarea there are a button to ...
0
votes
2answers
151 views

How can i call from custom fields to the category editor?

I found this code for custom field add category editor. I added custom field to the Category. e.g. My field name is Hastag and i have a Sport category. And i want to call display Sport's custom ...
1
vote
1answer
254 views

Deleting a custom field field

Is there a way to delete a custom field (in the sense of complete removal from WP database) without using a plugin?
2
votes
1answer
159 views

Making a configurable field translatable

I'm working on a theme right now that gives the admin the possibility to set different texts that are used within the theme, by configuring them in the admin panel (e.g. the text that is displayed, ...
1
vote
1answer
916 views

Using OR in WP_Query negates the “NOT EXISTS” compare

I'm attempting to filter posts by a custom field that either are equal to 'new' or have not been set yet. I'm able to get either of those meta_queries to work on their own but when I use them in an ...
0
votes
1answer
125 views

How can i display on front page a movie that is atached in a post type

Im building a cinema site, In post's i store the Movies I have a post_type name "box-office" , this post type have 1-10 custom fields, with i can select the movies stored in post's. locul_1 - is one ...
1
vote
1answer
216 views

How to Display pages with a Custom Fields in one page

I am trying to display all the pages that have custom fields of a certain value. What I would like to do is use the current page title as the value for the custom field and get all pages that have ...
2
votes
0answers
214 views

$wp_query meta_key naming issue [closed]

What I am attempting to do is sort posts by custom fields. I have a few custom fields that don't query properly and I get the 404 page. The fields that don't work I used hyphens in the naming ...
1
vote
1answer
118 views

How to display products name in a non-alphabetical order, in a custom field (taxonomy)?

Now the order is: apples, oranges, pears. But I want to be in a random order, for ex: oranges, apples, pears. Or to write them in a order that I want. Is this possible? Taxonomy is like that: ...
0
votes
1answer
821 views

Image upload and path to custom field

I build a script, to post from frontend. There are many custom-fields. Most works fine, but with one thing i have problems. First a description, then the script. It seems like, that images won't ...