We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [custom-field]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
25 views

Show posts from WP Custom Post Type selected from a field in a metabox

Maybe, the question is unclear for you, but I will try to explain. There are two registered custom post types, song and album. I have a metabox on a Create an Album, in which I can select one post ...
0
votes
0answers
28 views

Get list of all existing meta keys [duplicate]

I'm using Custom Fields in my post type and I'm looking for a way to get a list of all existing meta keys. I know I can get all meta keys for a specific post with get_post_meta() but I need all ...
0
votes
0answers
11 views

Custom setting to show or hide field

I've got a custom post type (Places), and that post type has a custom field to indicate that the Place is a participant in a holiday-season promotion. I would like to create a setting somewhere so ...
0
votes
0answers
50 views

Issue on Getting Custom Field Value Added To the Custom Taxonomy

I am able to add a Cutom Field to The Custom Taxonomy and save it using the following code. I checked the database and the result is saving into the wp_options table like and when I try to get the ...
0
votes
0answers
14 views

Check if argument is empty (Problem Solved)

So below, I will go into detail on what I'm trying to achieve and if anyone can help me, it would be extremely helpful.
0
votes
1answer
40 views

Updating User 'Description' Meta Data (not working as expected)

I'm creating a form to allow users to update their bio ('description' metadata) on a custom profile page. Current values are successfully retrieved and new values are being stored to the DB, but with ...
0
votes
0answers
11 views

How to add a custom field on WooCommerce reviews form?

i have 2 problems with my code. 1. i can see only the title in the comments. cant see the cons. 2. how do i make the con's part to have a title "cons" and then the text that the user wrote. as oppose ...
0
votes
1answer
36 views

WooCommerce: How to display item meta data in email confirmation using woocommerce_order_item_meta_end

Our store sells software and we're adding a software voucher code to each purchased. Once the purchase is completed (via the woocommerce_payment_complete hook) we generate the voucher code and add it ...
0
votes
1answer
29 views

How to retrieve custom field types for all posts in WordPress/PHP?

I have a post type absf-episodes copied from the URL /wp-admin/edit.php?post_type=absf-episodes The custom fields which I have for the post type absf-episodes are: broadview_updated, description_en, ...
0
votes
1answer
53 views

Add a <select> drop down list with custom fields to comment form

This snippet does exactly what I need, except for the fact that it shows what type of user (Administrator, Editor, Author, Subscriber, Contributor) is posting the comment. I wanted to adapt it to ...
0
votes
1answer
11 views

Adding Facebook's image and meta description retrieval capabilities to a WordPress post

When a URL is shared on Facebook, Facebook is able to automatically pull a relevant image and the meta description for use in the post. Would it be possible to code similar functionality into ...
-1
votes
1answer
13 views

add multiple values (array) to post meta_input

i have a custom post type where a post is generated by a form submit. One key is an array which should be stored in a custom field... i shortended the code below to the important part -> they key is "...
0
votes
2answers
19 views

exclude posts with a specific custom field and value

How can I exclude posts with a specific custom field and value with this query? $my_query = new WP_Query( $args = array( // It should be in the first category of our post: '...
0
votes
0answers
22 views

wp_get_nav_menu_items() with ACF

I'm creating a site with two menus. First menu (logo + page title). The only problem is my first menu I would like my client can be added his phone number and it is clickable and his Facebook link in ...
0
votes
0answers
17 views

Sort on multiple custom fields using wp_query not working

I've been googling this for a couple days, and have read several similar questions on this site, but still can't figure out what I'm doing wrong. I'm brand-new (like two weeks) to customizing ...
0
votes
0answers
9 views

Cannot clone group of Custom Fields in CPT

I have my CPT, and I am trying to clone the group of Custom Fields in my metabox named as Credits. I have these fields to be cloned each time, when the user hit on + Add Group button: Text ...
0
votes
0answers
6 views

Creating an Administration Interface

I am looking at developing an admin interface of sorts for a Character tracking system for a local roleplaying game I run. The concept is: Characters level up each time they attend a game, at ...
0
votes
0answers
9 views

ACF field in menu but outside menu wrap

I am trying acf in menu for but the problem is that i want to call its value outside the items_wrap separately also is there any other way than creating hook in functions.php , i search a lot but didn'...
0
votes
0answers
38 views

How can I match multiple CPTs in one row in mySQL?

I would like to start a query in the WordPress mySQL database where I connect several CPT's with each other and output them in one row per service CPT. mySQL example:http://sqlfiddle.com/#!9/2ed83c/3 ...
0
votes
1answer
39 views

Wordpress colorpicker save both hex and RGB

Trying to get both the hex and RGB value of a color from the native color picker in Wordpress, user chooses the color via a custom metabox in the admin. Just need to save both values as meta for re-...
0
votes
0answers
17 views

Problem in moving cpt's from local website to live website

I've made a custom post type, designed a custom page template for it and tested it on the local server. I've copied those custom post types to my live website. On live website it is pulling custom ...
0
votes
1answer
38 views

Save custom field on WP_List_Table

I have a custom field which is named clicktripz_object_location. I've created a WP_List_Table with the following code; if(is_admin()) { new UCO_Wp_List_Table(); } /** * UCO_Wp_List_Table class ...
0
votes
1answer
17 views

WP meta_query args not working in function

I have three query args for filtering posts in grid. By Author and Status works fine, but ACF meta_query not work. I setup field as select: http://prntscr.com/pi6m66 I need when is selected "Ne" ...
0
votes
1answer
16 views

Should Custom post types and fields be in the theme files or in a custom plugin packed into the theme?

I am trying to create a Custom Premium WordPress theme for a Travel Agency. I am thinking of finishing the theme and submitting it for review. I want this theme to be really useful so I ended up ...
1
vote
1answer
21 views

How Meta Data is different from Custom Fields of POST/PAGE in WordPress

I am really looking forward to have a clear picture of Why Meta data is being used for the Posts/Pages? I have always been wondering on how Meta data is different from the Custom Fields of Posts. I ...
0
votes
0answers
16 views

How To Append Buddypress's Extended Profile Fields to Profile page? [closed]

I have made a WordPress website that specializes in registering users. So I wanted more profile fields to register more user data, so I used BuddyPress's. The problem I have is when I want to ...
0
votes
0answers
24 views

How to save fields with elementor into Custom Post Type created by me?

Im working on a project where Elementor('no-code-feelings') is a pre-requisite. So, what im facing: 1st) i've Created post type named lp_item with 2 custom fields: lp_item_a and lp_item_b; 2nd) i've ...
0
votes
0answers
14 views

Using date stored as custom field to order posts

I have a custom post type "travel" and a custom field "data" (date format j F) and I would like to see all the posts in order by the custom field "data". I think I have to transform it into timestamp ...
0
votes
1answer
26 views

query posts custom field calculation value

I have a front-end form whereby users create a post and input 3 numerical custom field value` as part of their post. These 3 custom fields are then calculated and the result is displayed in the post....
0
votes
1answer
17 views

Add image to menu item with AFC

I'm trying to add an image to menu item, can't get it to work. Here is my code. header.php <?php wp_nav_menu( array( 'theme_location' => 'side-...
0
votes
0answers
60 views

Is it possible to add Term Meta Fields to a WooCommerce Attribute?

Is it possible to add Term Meta Fields to a WooCommerce Attribute? I know I can do this with regular categories, but I'm wondering if there is a way to do this with product attributes. (without a ...
0
votes
0answers
34 views

Adding a drop-down (select tag) option under Menu Settings in WordPress Admin

I looked (surfed) around a lot to get idea of how can I add custom field/drop-down under "Menu Settings" in WordPress Admin. I want a select tag with options from which I can get value based on the ...
0
votes
0answers
13 views

Adding Check Button On Posting Section On My Theme Wordpress

would like to add a radio button on my theme to appear on posting section why i need it am using custom filed to show a specific post on my blog and adding the metas every time am posting is hard ...
0
votes
0answers
31 views

Add custom field in admin ( edit.php )

I want add another box in edit.php side of search box. I googling for it, but not found anything. How I can?
0
votes
1answer
30 views

Enable Custom Fields For Custom Post Type When CPT Created Using Plugin

My CPT is created using a plugin so i cannot edit the supports parameter to add support for custom fields. I tried using this code however it doesn't work either add_action('init', '...
0
votes
1answer
39 views

How can I fetch all the dates from custom fields from various different custom post types and show / list them at one place in ascending order?

I am using wordpress and pods for building a web app. I have created different custom post types like "project" , "task" and "material" and each of them have various different custom date fields. I ...
1
vote
1answer
133 views

How to access custom order item meta data from a meta key in WooCommerce?

I'm trying to display some custom meta data that's associated with the shipping on an order in WooCommerce. Here's the entire story of what I'm doing (so it might help someone else, and so you know ...
0
votes
0answers
34 views

Get All Custom Field Values from a Specific Category and Store Them in an Array

I added a custom field (location) for some posts. I want to get all the locations from posts from a specific category and store them in an array. I am using the following code to get all the values: $...
1
vote
1answer
43 views

Advanced search by two criteria - sort by location and date (ascending or descending)

I have spent a couple of days working on this and I am still not able to figure it out. I am trying to make advanced search filter that sorts posts from a specific category on two criteria: location (...
1
vote
1answer
18 views

How to toggle between two custom fields in WordPress woocommerce 'WC Product Field Group' plugin?

I have a full suit tailoring WordPress website and it using woocommerce plugin. I need 2 custom field groups to show in single-product page. Custom Measurements (Precise) In this method the client ...
0
votes
0answers
23 views

Add custom fields to search wordpress

I'm using the code below to be able to search using custom fields, which works perfectly but has problems with live search. function cf_search_join( $join ) { global $wpdb; if ( is_search() ) ...
0
votes
1answer
34 views

register_rest_field update_callback don't work for $_FILES

I try to insert a post with REST API who contain text and image in one api call. My image is an acf field. I register my field like that: register_rest_field( 'project', 'logo', array( '...
0
votes
0answers
12 views

How to update user_meta_data from frontend

I want my user to be able to choose if they are a company or individual I've made a user_meta_field in database and it works fine, but how do i make some sort of option on my page-profile.php template,...
0
votes
1answer
33 views

What requirements for ACF custom fields key and name properties?

I have the ACF custom fields plugin and I am using acf_add_local_field_group to register custom fields via PHP. When creating a field via PHP I must provide 3 properties: key: ACF unique identifier ...
0
votes
2answers
17 views

How do you output an unknown number of images in a custom post type with desired markup?

I'm working on a theme that will have an image gallery within a custom post type. I'm able to insert them into the post (using Advanced Custom Fields and embedding them in a WYSIWYG box) but I was ...
0
votes
1answer
10 views

How do i call up default post title in custom posts

anything i put after <div class='article-content'> displays as a text on the front end instead of calling up the original post title add_filter( 'the_content', 'prefix_insert_post_ads' ); ...
0
votes
1answer
32 views

Query custom post type and custom field by URL parameters

I have a custom post type staff. and a custom field alphabet for posts in that post type. Each staff will be assigned to a letter either A or B ... Z based on the first letter of the staff's name. On ...
0
votes
0answers
23 views

WP query custom search by meta query nested ACF repetear field Group > Repeater

So I have searched the web but didn't found quite an good solution to this problem. I am having nested ACF field with a repeater inside a group and I want to display and order wp query by that item ...
1
vote
1answer
16 views

Get a list of posts with associated meta_value

Recently I began to use the Custom Fields. I would like to display a listing of posts which contains the meta_key "oldtimer" and also get the corresponding meta_value. Here is the expected result: &...
0
votes
0answers
25 views

Filtering posts by ACF meta query

I am trying to filter posts by a meta_query, based on a post field. The field type is checkbox. The field configuration is: acf_add_local_field_group(array ( 'key' => 'group_5a579h8fs9a98a', ...