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

learn more… | top users | synonyms (2)

0
votes
0answers
4 views

How to get users by a custom field / by user meta data?

I've added a custom field to users profile using the following code: /*** Adding extra field to get the the user who creates the another user during ADD NEW USER ***/ <?php function ...
0
votes
2answers
14 views

Compare meta key separation

I have a meta key called $availability that can have one of four options but also multiple values separated by pipe: |. For example the value could be: severaltimes_week|oncetwice_month|occasionally. ...
0
votes
0answers
6 views

how can i add search box in single.php in genesis wp

i m using following code to found search box in single.php echo '<div class="search-cat-form-left">'; twentythirteen_paging_nav(); ...
1
vote
0answers
8 views

Include related custom fields from one post type in another post type's JSON feed

I have a custom post type called Offers, and in this post type is a custom field called Store, which is a relationship field type to another custom post type Stores. This has been created using the ...
0
votes
0answers
5 views

update_post_meta based on acf repeater field

I'm trying to update post meta in an acf repeater fields have value using this function, but it's not working: function save_photos_meta_data( $post_id ) { if( get_field('photos') ) { ...
0
votes
1answer
10 views

Generate slug and meta data if meta field is empty

I am creating a current vacancies feature in a client site, and am struggling on one area. I want to have a slug generated from a reference number, rather than the post title. This, I have set up. ...
0
votes
0answers
25 views

Define an extra field for all pages (with no plugin?)

I usually use WP Types define custom fields, post types, ... But I have a theme a little bit overloaded of plugins, so I would like to define this field for (all) the pages in functions.php if ...
0
votes
1answer
61 views

Query using string from custom field as array value

Firstly, what I am trying to do is display posts from Category x on posts from Category y where text from a custom field on post from Cat y matches text from one of 2 custom fields on cat x. I am ...
0
votes
1answer
11 views

Save values generated via API as custom meta fields

I'm using the IMDB Connecter plugin to grab meta data for movies and I'm wondering if I can save some of the information it generates as custom meta data. Basically, I want to be able to save the ...
0
votes
1answer
34 views

Json api does not return all metadata

I am using this plugin https://wordpress.org/plugins/json-api/ to create a new entry is saved correctly in the database all the wp_postmeta customfield table, but when you run ...
0
votes
0answers
19 views

Order by (sort) taxonmy fields using taxonmy custom field value

I have taxonomy:-shop_vendor with multiple vendors and every vendor have two radio buttons 1)Wellness 2)Dietitian and each vendor have selected one radio button at list. If i have 6 vendors in ...
-2
votes
1answer
12 views

Display Custom Latest post in custom post [closed]

i m created a custom post and many fieled decared .i want to display here lastest post , that is created in custom post not in simple Post
1
vote
3answers
24 views

Orderby meta_value only returns posts that have existing meta_key

I have the following wp_query: $args = array( 'post_type' => 'news', 'orderby' => 'meta_key', 'order' => 'ASC', 'meta_key'=>'custom_author_name', ...
0
votes
0answers
18 views

Converting Custom Fields to Meta Boxes [closed]

I am using regular custom fields for some post meta like "location", "price" etc. Want to convert them to meta boxes. Or give them a "metabox" look. I need to keep all the meta "Keyes" same. Just want ...
0
votes
0answers
18 views

custom meta box text field: how to limit to alpha or numeric only

I created a custom meta text field for adding a body class to a specific page. I want to limit the text to only alpha characters. Also, I am using ...
0
votes
1answer
16 views

How to loop through a custom field for each post, & display?

I'm working on a category page. I want to show all the posts that belong to that category on one page. Each post makes use of a custom field that I have added. I want to loop through the posts to ...
0
votes
0answers
19 views

make next and prev button with custom field in WP?

how do i make a custom next and prev post button in WP ? this is my query : rd_args = array( 'meta_key' => 'user_mode', 'meta_value' => $mode, 'offset' ...
0
votes
0answers
8 views

DB optimization caused custom field and link loss

I recently did DB optimization and after that I lost all my Advanced Custom field entries and menu links. Is it because my DB got corrupted? How to resolve the issue? Thank You
0
votes
1answer
25 views

Hook after meta created

I'm having troubles trying to do a hook when post published. I think that the problem is that my WP-Metaboxer plugin creates the meta after publishing post, and I cannot capture the value. Here is an ...
0
votes
1answer
35 views

How to check if user meta field is empty in conditional else statement

Hello all I have a custom post type set up for my wordpress site within this custom post type i have a meta box with about 11 meta fields that I have added programatically. What I would like to do is ...
1
vote
1answer
20 views

Replace text in post from cvs

I have constructed a post template that i want to use to all post. I use visual composer and some add ons . I need to create post with vcs file but i don't know hot to organize the cvs inside to do ...
0
votes
1answer
29 views

update_post_meta not working in function

I am attempting to take some custom field meta data (generated via the ACF plugin) and save it as post meta with a function. This is what I've come up with: function tps_create_slotcode($post_id) { ...
0
votes
0answers
13 views

Replacing Standard Category Metabox

I am rewriting the standard category metabox to include a Custom Field as a select box which is dynamically updated as the user chooses the categories. This select box is set with all "checked" ...
0
votes
0answers
17 views

oEmbed single custom field with multiple values

I need to display a single custom field with multiple values, but I need to display those values with oEmbed on it. I found this, but it only shows a single value: echo wp_oembed_get( ...
0
votes
0answers
9 views

Using a Select Field Type to add a class name to a specific li

I have a menu of departments where the active li will have an class="active". <li class="interiors"><a href="#">Interiors</a></li> <li class="lite"><a ...
0
votes
0answers
14 views

Extra text'n'image field in a page

Hi there dudes and dudettes! I have been serching around for a bit, but havent quite found my answer as of yet. I want to add extra fields for products on a webpage. Just as simple as a small image, ...
0
votes
0answers
20 views

count click on link class on posts and add it to custom field

I have 4 links on each of my posts (facebook, twitter, etc ...), what I'm trying to do, is that everytime someone click on one of this link, i'll have a counter incremented, and store the reslut in a ...
0
votes
1answer
27 views

Ordering posts by custom fields

good day, quick question, I have a site that pulls posts from certain category, basically the code to see how I call those posts is as follows: <div class="jumbotron"> <h2>Ultimos ...
0
votes
0answers
16 views

Admin search ACF relationship

I have a custom post type name story. It has a custom field named 'select_artist' with a relationship to a custom post type named artist. Within the story edit page, I want to use the search box to ...
0
votes
2answers
54 views

Search result page - display values from the result's metaboxes

i have this custom search-result page global $query_string; $query_args = explode("&", $query_string); $search_query = array( 'nopaging' => true, 'post_type' => ...
0
votes
2answers
21 views

How to add the post ID (or any other post data) to a Contact Form 7 mail?

I've downloaded Contact Form 7 to add contact forms adding a simple snippet after every post, and I've added it in functions.php like this : //if post type I add a form function is_post_type($type) ...
0
votes
0answers
23 views

Custom field value inside html code with shortcode

I would like to create a shortcode -> [myCite] which puts out a custom field (named custom_cite) value from a custom post type "post_thoughts", wrapped in a html wrapper. Now I want to use the ...
0
votes
0answers
26 views

WP_Query custom field pass the post id

I'm using WP_Query with ACF(Advanced Custom Fields) I'm building a news portal, and I'm trying to pass related stories from 1 post which is top_story = true. In another WP_Query I want to print the ...
0
votes
2answers
45 views

WP_Query a custom field value bringing back 0 results

I am trying to do a query to grab all the pages that have the tickbox checked "feature_on_front_page" which has the value "featured" with label "Featured". I added this checkbox with ACF. My query ...
1
vote
1answer
19 views

Use custom field as a variable

I am trying to use a custom field value within a google api url. I have 2 custom fields. I need to output the value of these custom fields within a url. Custom field keys: app_collection-postcode ...
0
votes
1answer
37 views

Filtering custom posts by custom fields (ACF) [closed]

I'm working on a site with photo contests. Each contest has a lot of additional info, which I store in custom fields (thanks to Advanced Custom Fields). Now I want to search through contests filtering ...
0
votes
1answer
20 views

Custom Behavior when Adding New Custom Post Type in Dashboard

I have a Custom Post Type that I'm doing some custom work for. I want to attach some custom functionality to the post type once it's created but an admin can only trigger the custom action from the ...
0
votes
1answer
19 views

How to print the Custom fields values [closed]

I am working with genesis theme in wordpress. I am created custom fields using Advance Custom field plugin. Now i want to know that how i can print the fields value into my frontend page ?
0
votes
0answers
14 views

Custom WP MultiSite with Workflow

This is quite a weird question, so here goes. I have this project to take 1 main site and make 200 sub sites off of it. The sub sites will have defined content areas within a page where the sub site ...
0
votes
0answers
31 views

wp.editPost 'API Wordpress' doesn't edit custom fields

When I try to edit custom_fields with wp.editPost. Only edit the other fields, but not custom fields. Custom fields are created again(repeat fields), but will have to be edited. I am looking: ...
0
votes
1answer
23 views

Get all the posts where meta field with multiple choice has several values checked

I apologize beforehand for any confusion, I'm just 2 days with WP. So, I use Advanced Custom Fields to add formatable custom fields to posts of partucular type. One of fields is checkboxes with ...
0
votes
0answers
22 views

Get posts of specific post format, extract youtube link and use ID for image thumbnail

I am looking to query four posts of which I'll display the title and the video thumbnail. Something like this maybe? $args = array( 'tax_query' => array( array( 'taxonomy' ...
0
votes
2answers
40 views

Get a post_id where meta_value equals something in a serialized meta_value field

I'm storing CPT products' post IDs into CPT companies' post meta (meta_key = prefix_products). As a company can have multiple products, so I'm storing them into a PHP serialized array value. ...
0
votes
1answer
21 views

wordpress custom loop ascending descending posts by custom field

I am developing wordpress site that is depend upon price so i add custom filed named 'price' <?php while ( have_posts() ) : the_post(); echo $price = get_post_meta($post->ID, 'price', TRUE); ...
1
vote
1answer
31 views

Difference between meta keys with _ and without _ [duplicate]

In wp_postmeta table I noticed that some of the keys are with '_' (underscore) prefix and and some are without _ What is the major difference between these fields and how they can be used while ...
0
votes
1answer
68 views

Let author add field to metabox by pressing a button

I have added a custom metabox for authors where they can fill in a url to a source, which I can then use in my template. In my functions.php <?php /* Add metaboxes (see below) */ function ...
0
votes
1answer
24 views

How to write specific HTML code with a specific custom field? [closed]

In my Wordpress, each post can contains 2 buttons pointing to different links. To make it easy for the end user, I want to create a couple of Custom Fields where the user only needs to enter the URL ...
0
votes
0answers
40 views

Define category ID using get_post_meta

I need to define the Category ID in my singles page through custom fields so that i can load a different category depending on the page. This is what i have so far and its not working. Any help would ...
0
votes
1answer
36 views

Sorting Posts by custom field

I'm trying to sort my posts by the custom field artwork_title. When I use the following code, I just end up with one particular category of posts no matter what category archive I'm on. Also ...
0
votes
2answers
56 views

Adding and updating repeating custom field meta data

I've got 20+ hours into this and could really use some help. Here is what I am trying to do.. For each record, add post meta. If the post meta already exists, update each field in the array. Just like ...