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

How to Duplicate (multiple meta box)?

I've made a meta box field which works nice, but now i need to add one more. For the past few hours I've tried to mix every piece of it, to duplicate it, take some parts, google, search, and no luck. ...
1
vote
1answer
9 views

How to display submenus on page based on referring top-level parent?

I am trying to display a secondary menu on pages that displays all the coordinating sub-pages of the top-level menu item they navigated there from, but my issue is that some pages appear under ...
0
votes
1answer
18 views

Update field name without losing the value

So I have this photography website using ACF with flexible content. It has approximately 300 posts. Due to requirements, I need to update the name of some fields. I've tried the following query: ...
-1
votes
2answers
25 views

Assign class to Drop Down Selections in WooCommerce Products Custom Fields

I have added a drop down to the WooCommerce Inventory Tab where the user can choose message to show in front end. In functions.php: // Display Fields in Back End add_action( ...
0
votes
1answer
12 views

Login_form add to top of form rather then bottom

I have added a 3rd field on the login page, but it shows at the bottom(underneath password) while I would like it to show above Username. How can I manipulate the order of fields? This is the code I ...
0
votes
1answer
24 views

Problem with saving large amount of data in postmeta/usermeta

I am facing issues saving large amount of data in post meta field e.g. I have created a field Bio/description and put a huge amount of text in it. Now when I save it, it saves some of the text and ...
0
votes
1answer
28 views

meta_query 'compare' => '!=' not working

I am using a custom post-type, in post there are a checkbox meta field for featured post. So there are two scenarios. First with featured posts Second with non featured When I called featured ...
0
votes
1answer
15 views

Auto populate custom fields by post date

I have an old blog with lots of posts, I created 2 new custom fields "Year" and "Month" using ACF. I would like to auto populate them from the post date after post save/update, is this possible ? ...
0
votes
0answers
15 views

How to add custom meta box to Quick Edit?

I have custom post type imggal. I want to add custom meta box imggallink to quick edit and can't find any right info for it. How to get it? Help please. I try to add column function ...
1
vote
0answers
23 views

Add additional 'description' field for defined roles / role metadata?

Is it possible to add an additional field for "description" to each defined role? (Administrator, Editor etc, plus custom roles). I'm using Justin Tadlock's Members Plugin and have created some ...
0
votes
0answers
24 views

Update custom fields after updating related custom field

I have a custom post type that I'm filtering by a custom field, I then select one of these posts & update it in the front end. But when this is updated, I need to also update the other filtered ...
-1
votes
0answers
22 views

wordpress permalink with specific meta value and custom post

One Client want to manually add permalink in page.php .. Something like this <a href="?post_type=wprojects&year_built=2016">Projects 2016</a> And when somebody click on this link it ...
0
votes
1answer
32 views

How to display custom field in woocommerce email orders? [closed]

Am having trouble showing custom field data from a select drop down in the order email form in Woocommerce. The data is showing in the admin page order just not email? add_action( ...
0
votes
0answers
17 views

Extend Metabox.io map field to sepearate lat long values

I am trying to separate the latitude and longitude values returned by the map field from the metabox.io plugin and save them as separate values. I have found a comment from the author (shown ...
4
votes
1answer
55 views

How to use custom fields in post title?

Certain posts of mine will have the custom field release_author in them - others don't. If that field exists, I want to display that in the header.php's title (not in the h1 of the post itself. ...
-1
votes
0answers
14 views

Add filter to custom fields in functions.php

I've created a custom field named "colors" that i want to put values like {R}. I have a plugin that has a function dad_clothes and at the end adds that filter in order to work in posts content: ...
0
votes
2answers
27 views

Get custom term meta problem on single post type

I'm trying to display a custom field value added to custom taxonomy on single custom post type. I have articles post type with custom taxonomy called issue. I used the code from Tax-Meta-Class to add ...
0
votes
0answers
10 views

List posts that are geotagged within a certain area

I'd like to geotag some post on WP with latitude and longitude in a custom field. It's very easy to show a map with this data but what if I want to show all the posts that are geotagged, let say, in a ...
0
votes
1answer
23 views

Is it possible to retrieve all posts with a certain value for metadata?

Under 4.5, I have posts with meta_key as series and meta_value as 19, 20, etc I am trying to loop through them in a template, and I guess I'm a special kind of dense. Most recently I have tried ...
0
votes
0answers
11 views

Does get_post_meta result in a database query each time?

I want to add some new functionality to a post type. It is going to result in a dynamic number of meta fields. I want to know if i could consolidate the content into a single field (messy) or to ...
0
votes
1answer
27 views

Custom meta is not being saved

I have created the following class in order to add a custom metabox for my posts, but the data is not being saved. Anybody can say what's wrong with my code? class Anotai_Meta_Box { public ...
0
votes
0answers
53 views

Post order by custom field

I have added a custom order option in woocommerce to sort products based on a custom field (number). The following code works for products with assigned custom field. My issue is that the products ...
-1
votes
0answers
10 views

Sortable column treating int column as string [duplicate]

I have added a custom, sort able column to a post list. The post list displays and when i try to sort it, the results will order them as if they were strings. For example, when i sort i get results ...
0
votes
1answer
19 views

Way To Store Global Meta Values

When using posts there is a way to store meta values on a per post level. Is there a way to store values on a global site value? I want to save a numeric value that isnt tied to any single post. I ...
-1
votes
1answer
20 views

How to make a customized user registration form using the built in wp-register() template tag

I want to make a registration form in WordPress, but i need it to contain my own custom input fields. For instance, i need it to have an input field such as COUNTRY, SCHOOL, COURSE, ...
0
votes
1answer
28 views

Custom post type name and assigning custom taxonomy

I've made mistake creating custom post type. I've put: register_post_type( 'Post Name', $args ); instead of register_post_type( 'post_name', $args ); Now I need to assign new custom taxonomy to ...
1
vote
1answer
39 views

Query all posts if multiple meta key don't exist

I'm trying to get all posts that don't have a meta ket that starts with aa_. I can do it this way $args = array( 'posts_per_page' => -1, 'category__in' => 23, 'meta_query' => array( ...
0
votes
0answers
19 views

Add custom field for users

I am using Metabox for a while and is a great plugin but I was using in pages and posts. Now I want to add a simple checkbox to users profile page, is that possible with Metabox plugin? Can any ...
1
vote
0answers
63 views

woocommerce in check out page how change the tax rate with ajax an php [closed]

Hi can anyone please tell if possible change the tax rate in woocommerce plugin in chekcout page i want to change the rate tax 0% or 19% when user select option if personal(19 %) if company (0 %) ...
1
vote
1answer
45 views

Update custom field values on edit address page woocommerce

I have two custom fields included in the checkout page and also in the edit address page in myaccounts of woocommerce. The problem is the two custom fields 'billing_door' and 'billing_flatname' are ...
0
votes
1answer
40 views

How to Save settings of custom tab product page in admin side in a database?

I have following code : <tr> <th><?php _e('Custom Stock Message'); ...
1
vote
1answer
77 views

How to add tab which is visible only in admin side of product in woocommerce? [closed]

I am new in wordpress development. I want to do add settings in a product page in a new tab. How to I add settings code That I tried to add Tab //add product tab link in admin ...
0
votes
0answers
8 views

Book-like index on a page with foreach custom field and array merge

I'm trying to make a page with a Table of Contents in which my 'lyric' posts need to be ordered by three different custom fields. Basically each song could either be Original or about a Game, and in ...
0
votes
1answer
43 views

Edit custom fields in posts list

Is it possible to edit (or add) custom fields directly in posts list (/wp-admin/edit.php)? I need to do it quickly for many posts (1000s) so editing every and each of them would take ages to ...
-1
votes
1answer
18 views

Show or hide custom fields by user's role [frontend]

Is it possible to hide or show custom fields by user's role. For example: I have custom field "wholesale_notice" and it have to be visible only for my "wholesale" user role. Thanks
-2
votes
1answer
111 views

woocommerce how in checkout to add my custom field check box, and when i check it hide the shipping adress and add tax 19% [closed]

Hi i working in page with virtual product i need to do this so this i want to do i want to have a checkbox with name "Personal" so when click hide right way the company name adress etc also i want ...
0
votes
0answers
18 views

Making Custom Admin Columns Editable

I have a Custom Post Type called 'team'. This CPT has numerous Custom Fields (created using the Advanced Custom Field plugin) of which one is 'day'. I understand that in order to get the 'day' value ...
0
votes
2answers
43 views

If value present, order posts by two consecutive custom fields

Basically on my site I have a bunch of song lyrics and in a static page I want to show them listed by album Link to my website and album position of the song and I have two custom fields with that ...
0
votes
0answers
14 views

Category page ordered by custom fields with IF conditions

on my site I need to sort posts by a custom field when shown in category pages like this one, but my problem is that I kinda need to do it like this: -if post of the "lyrics" type has the field ...
4
votes
1answer
104 views

Wordpress 4.4+ : How to revision CPT + metadata

In WordPress 4.4+, how do you enable revisions for Custom Post Types along with their metadata? How can you get this information to appear in the diff view? I've attempted to implement what was ...
0
votes
2answers
36 views

Custom field picture instead of post thumbnail on category page

I'm trying to modify a theme to make it work with my custom fields (I'm using ACF for most of the data I put on pages) for a site with song lyrics on it. The original code was this: ...
0
votes
0answers
42 views

Sort search results by meta_key value

I really need help with this. Below is a code of my template for search results page search.php and everything works just fine. Now, the website is about public events so it's very important that ...
0
votes
0answers
22 views

How to retrieve referrer tag, and save in custom fields for each WC order?

I need to save the traffic source of each order for my Woocommerce store because I need to know what internal page or external website had resulted in that order. I'll need this for customer service ...
0
votes
1answer
46 views

Advanced Custom Fields from Category - IF statement

Please if someone could help ill be very greatful. I know how to use the if statement using Advanced Custom Fields on posts - but this time I want to pull the value from the Advanced Custom Fields in ...
1
vote
1answer
67 views

Passing Variable as URL Parameter — Security concerns?

I need to make sure I'm not opening up a security hole in my site. I have a Custom Post Type called "Communities" and a custom post type called "Floor Plans" and need to add a parameter to the URL on ...
0
votes
1answer
20 views

Check for meta data before it is published

I am using a church theme and custom post with its own set of meta data. What i want to do isif a sermon post is published, WP will check whether someone included a video URL. If they do, check the ...
0
votes
0answers
16 views

Group posts by month by custom metabox?

is there a way to do this ? August 2009 11 Title of the post of the 11th day of August 15 Title of other post of the 15th day of August 20 Title of another post of the 20th day of August July 2009 4 ...
1
vote
2answers
35 views

Can't display errors in attachment_fields_to_save

I am writing a plugin for adding a custom field to the image attachment dialogue box, the plugin works for storing valid input data. I have a problem for showing the error message "This is not a valid ...
0
votes
0answers
64 views

Woocommerce: Custom Price Calculation in Variation based on number of pages per book

I am developing a website were you can make and sell your own book. The Product layout needs some specific features that force me to use Product Variations and using the standard Attributes: so far, ...
-1
votes
1answer
104 views

How to show all posts of specific custom post type with their custom fields values?

I am trying to get the list of all posts with post_type "staff" along with custom fields assigned to this post_type. Custom fields were create with help of ACF. I've tried both: $query = new ...