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

learn more… | top users | synonyms (2)

0
votes
0answers
7 views

Show custom field associated with embedded media

I've added a custom field to all media (using the Advanced Custom Fields plugin). I want to display this new field underneath all embedded images within blog posts (if the custom field exists for that ...
0
votes
0answers
17 views

“meta_value_num” not working when value is wrapped in html tags

I should start by saying I have little to no knowledge of PHP, nut I am responsible for managing a wordpress site for a restaurant. I have the menu items listed in order of price using the following ...
0
votes
0answers
11 views

Add input field to edit page depend on selected page template

I want to add some input fields to "edit" page depends on template. Step 1: add_action( 'add_meta_boxes', 'cd_meta_box_add' ); function cd_meta_box_add() { add_meta_box( 'my-meta-box-id', 'My First ...
0
votes
0answers
7 views

WooTickets for Events Calendar Pro - Custom field for each ticket for CSV Export?

I'm using WooTickets and Events Calendar Pro for WooCommerce, and I wanted to add an extra column to the CSV report that gets exported by default. I've got that much achieved by adding the following ...
0
votes
0answers
5 views

WooTickets for Events Calendar Pro - Custom email field for each ticket?

I'm using Events Calendar Pro and WooTickets for WooCommerce, and I was interested in adding a custom field to the back-end of each ticket, but I can't find much useful information on that. My ...
0
votes
0answers
19 views

Adding custom field to permalink structure

I have a wordpress site that uses a custom post type 'external-projects'. Within that custom post type there is a custom field 'director'. What I am trying to do is rewrite the permalinks to include ...
0
votes
1answer
22 views

Display custom fields only if it has a value

I've setup standard custom fields for some products in WooCommerce which are being displayed on each product page on the front end. However, I'd like to hide those fields that don't have a value ...
1
vote
1answer
43 views

How to solve suspected memory issue in custom WordPress loop?

I have written a plugin that adds a "Where did you hear about us?" question to the WooCommerce checkout page and shows the results (as a simple horizontal bar chart) in a wp-admin page. The plugin ...
2
votes
2answers
75 views

Does wordpress have something like content-type?

I am working on Drupal CMS, and Drupal is really grate and hard, and now I am going to learn Wordpress. Drupal let users to create different content-type, and each content-type can be different type ...
0
votes
0answers
19 views

How to fetch custom post type data with ajax? [on hold]

I want to fetch custom post type data with ajax. For example I have a custom post type eBook. with an ajax call i want to show all Catagories of ebook. When one click on a catagory like Science then ...
0
votes
0answers
13 views

How to register custom post types like ebook and taxonomies with code?

There are more than 10 plugins to create custom post types and taxonomies. But one problem to use that is if accidentally plugin deleted, all works related to that plugin will be deleted.So I want to ...
0
votes
0answers
9 views

Post expire by gravity fields

I'm using gravity forms to let users publish some content from front-end. But I need to let then set expiration date. So I've installed Content Scheduler and Post Expirator plugins, because plugin's ...
0
votes
1answer
21 views

Custom fields and auto save

I have the issue of data in custom fields dissapearing after auto save, but no answer here helped me (Custom field being erased after autosave). I have this custom field: add_action('save_post', ...
0
votes
1answer
18 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
18 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. ...
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
6 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
11 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
26 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
65 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
12 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
36 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
23 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 ...
1
vote
3answers
27 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
19 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
19 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
43 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
21 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
31 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
15 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
20 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
15 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
23 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
29 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
22 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
63 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
22 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
25 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
32 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
20 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
43 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
32 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: ...