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
0 answers
9 views

Custom field on Quick Edit using select/dropdown - almost working right but not showing currently selected value

I'm new to WP plugin programming but have been tasked with the following. GOAL: Create a plugin that does all the following: Set up default chat departments for each domain. Create custom field using ...
user avatar
0 votes
0 answers
8 views

Order by the first array within a meta_query

I would like to sort the output of my WP Query. I want the events that are coming up soon to be at the beginning. The events that have already taken place should be at the end. So the first array in ...
user avatar
-1 votes
0 answers
7 views

Survey plugin or custom development

What is the best plugin(s) for creating a self-appraisal survey? Let me explain what I mean I have 20 characteristics and i need people to choose 10 of those characters that best describe them. All 20 ...
user avatar
0 votes
1 answer
13 views

Table of contents (TOC) plugin is not showing header tag

I made a post template using meta box(custom field). If I put data into metabox, the template part (contents with h2, h3, p) shows up at the bottom of post (not on post edit page). However, every TOC ...
user avatar
2 votes
2 answers
143 views

How get custom field from custom taxonomy?

I need to list all categories and their respective posts. Each taxonomy has an image created by ACF in jetengine plugin. I created the loop that returns the list of categories and posts for each ...
user avatar
0 votes
0 answers
13 views

WCFM vendor registration create a new select for the existing phone element [closed]

Hi does anyone have experience with wfcm vendor registration? I need to create a new select for the existing phone element where the country_code selection will be displayed. it should then look like ...
user avatar
0 votes
0 answers
15 views

Having a repeating custom field in admin custom post type, what I'd go better with, for DB's sake? ACF repeater or query a different post type?

I have: A main custom post type - 'Cards' - each post showing its ACF repeater custom field - 'operations' - with the following sub-fields: 'add/remove', 'amount, 'value', 'date'. Let's say the fully ...
user avatar
0 votes
1 answer
20 views

How to inherit field value from parent post into in child / sub post

I have created a custom post type, called 'centres'. This CPT is hierarchical, ie, I can create child pages under each custom post. Centre1 Location1 Contact1 Centre 2 Location2 Contact2 I've ...
user avatar
0 votes
0 answers
6 views

Auto populate a user custom field from another user custom field

I have a WP theme with its own custom fields including one for Phone Number. I also installed the Digits Plugin which allows users to sign up/login with their phone number and OTP, which has its own ...
user avatar
0 votes
0 answers
23 views

How can I detect user's timezone?

I have a custom post type in wordpress. I am pulling various data from remote server with API and adding it as custom fields to this post type. Among them is date and time whose Timezone is Turkey. I'...
user avatar
0 votes
1 answer
15 views

Rewrite comment form post ID on submit

I have a WordPress comment form, with a custom field (added with the Advanced Custom Field plugin) where the visitor can chose from a options (these are page IDs). When submitting the form, I want ...
user avatar
  • 1
0 votes
0 answers
13 views

How to Display WooCommerce Product Price in WooCommerce Archive

I have created a custom function to display 2 custom fields (ACF) and the price of the product after the item in the WooCommerce Archive/Shop page. My Custom fields are show, but I am unable to get ...
user avatar
  • 106
0 votes
0 answers
25 views

How to change text color depending on the number value (Using javascript)

I'm trying to change text on the table depending on the meta value I give (number). if meta value >= 7, number text on table changes to green. else if meta value >= 4, number text on table ...
user avatar
0 votes
1 answer
26 views

how to get serialized post meta

I have posts that have video content and these videos stored in database like this (serialized) a:1:{s:9:"video_url";s:0:"";} This serialized data have post video urls but can ...
user avatar
0 votes
1 answer
26 views

Hide Heading if ACF Field is empty

I am trying to add a "Local FAQ" section to all the individual location pages on a site with literally thousands of individual location pages. I am doing this by using ACF field in the ...
user avatar
0 votes
0 answers
5 views

Add WordPress user custom meta to chartjs vertically stacked chart in Divi theme

I have created a user dashboard using the Divi theme where I need to add a chart like the attached screenshot. The data are specific for every different user. I have tried many premium plugins but ...
user avatar
0 votes
1 answer
25 views

Custom Fields - How to create a list from multi-line entries of a single value

If I have the following name/value pair for a custom field.... ...is there a PHP loop process I can apply that will allow me to display them on the front-end as individual values because there is a ...
user avatar
  • 708
0 votes
0 answers
10 views

show a specific metabox dependent on the page template

For a few days I am trying to show a specific metabox dependent on the page template. I can do it but my problem is when I have selected a page template and hit the update button then the metabox does ...
user avatar
0 votes
0 answers
24 views

ACF field group not showing in page

i've created an ACF field group just for one page, since my clients will need to upload 2 files directly related to that page (it's a page about a basketball team, so they'll have to upload the ...
user avatar
  • 1
0 votes
0 answers
13 views

excluding posts by an ACF field in pagination

So I have this $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $args = array( 'post_type' => 'post', 'posts_per_page' => 12, 'category' => 1165, 'meta_query' =&...
user avatar
  • 1
0 votes
0 answers
12 views

Type character in name and make it invisble

my website is using MyHome theme. I need to write identical names for two search fields. Here - https://komand.suvenirite.net/dava-pod-naem/?offer-type=rent And here- https://komand.suvenirite.net/...
user avatar
  • 1
0 votes
1 answer
71 views

order the meta query results by 2 custom fields

I have a custom post type 'brewery', I want to fetch results by 2 custom fields. The desired result is to get all posts with highest review rating (value is in decimal like 4.2 or 4.8) and if few ...
user avatar
0 votes
0 answers
11 views

Delete images from media library when user deletes an image from ACF Gallery

When a user deletes an image from the gallery in wp-admin I need it to be deleted from the media library too. I have a function using the acf/update_value hook which works uncorrectly. When a user ...
user avatar
0 votes
0 answers
48 views

Override WordPress core post-template.php block template

I need to modify the default markup generated using the render_block_core_post_template function located inside wp-includes > blocks > post-template.php. I don't see any other way of modifying ...
user avatar
-1 votes
1 answer
65 views

Filter post style attribute

Looking for a hook which enables filtering of a class within the post or content so i can add inline CSS using custom fields for posts on the home page. Something like this - add_filter( 'attr_entry', ...
user avatar
0 votes
0 answers
28 views

Create an user checklist system for a course plateform using ACF Pro and ACF Extended

I'm currently trying to develop a learning plateform on my website and I want to integrate a system allowing users to check a list of step defined for each course. I don't have heavy PHP skills to be ...
user avatar
0 votes
0 answers
43 views

Custom taxonomy terms as children of multiple custom post types

I'm about to start a part of my project that I've been putting off for too long. I'm not looking for code, I'm looking for confirmation that I'm on the right track and any advice Stackexchange may ...
user avatar
0 votes
1 answer
34 views

Sticky option for custom post types without using custom fields or plugins

The problem WordPress supports the sticky option with some of its default post types and doesn't provide any option to extend this to other post types. It's hard-coded in the met-boxes.php file: <?...
user avatar
0 votes
0 answers
20 views

What am I missing in this Code Block?

I am using ACF Pro and Oxygen Builder. I have a FG (Repeater) set for a Rooms & Suites FG. I have several sub_fields to capture attributes of each such hotel room that gets created via its CPT. ...
user avatar
0 votes
0 answers
13 views

Making WP_Query limit results by date before today where date is a meta_query

We have a custom post type, events. This has a custom field called event_start. In trying to query only past events, I'd like to limit the query with this basic logic: post type is events event_start ...
user avatar
0 votes
0 answers
15 views

Updating Metadata with Shortcode

I'm trying to create the below function to check a user's for the metadata field "order_review_cards", and swap the value for Yes-no or no-yes. Not sure why the code isn't working. I can do: ...
user avatar
0 votes
1 answer
30 views

ACF - Retrieve custom taxonomy from a relationship field

I have a custom post type, called prognosis with 3 custom taxonomies, Country, Competition, and Sport, I've also added a few ACF custom fields. I have another custom post type called analysis with an ...
user avatar
0 votes
0 answers
26 views

How can I add a field for featured image on backend of a custom Taxonomy?

I came accross this problem when trying to create a new wordpress Theme, I want to add a custom term field for featured images on the backend of a custom taxonomy, I have followed this tutorial and ...
user avatar
0 votes
0 answers
27 views

Best approach to make all tags searchable by the wordpress search function

I have over 2000 tags on one of my sites and I like them to be searchable by the wordpress search function. The problem is if I use a plugin, the time it takes to search them all is enormous. I think ...
user avatar
  • 299
0 votes
1 answer
15 views

Save all the post tags inside a custom field

I'm having some trouble to add_post_meta using the code below with all the post tags inside a custom field. The code works to echo all the tags, but not for saving them because it only saves the first ...
user avatar
  • 299
0 votes
0 answers
8 views

WooCommerce Meta

I have 4 fields names date_1, date_2, date_3, date_4 which are not always displayed to the customer on checkout (Plugin: Custom Field Editor). One of these 4 meta-fields exists and the other 3 don't ...
user avatar
  • 1
0 votes
0 answers
23 views

Woocommerce Shortcode which displays a table with product data

I searched for the internet but didnt find anything which works to my use case. I want to have a shortcode which displays a table of products. In each row I want the product to have the following data:...
user avatar
  • 101
0 votes
0 answers
36 views

Orderby meta_key/meta_value not displaying anything, am I overlooking anything?

I have an issue with my orderby using get_posts(). I want to order in alphabetical order a list by city name using a custom meta field, but it comes back empty. However when I orderby title, the list ...
user avatar
0 votes
0 answers
13 views

add_comment_meta not working properly

I have a scenario where I need to retrieve a custom field ('current_module') from a comment author's user profile and add it to a custom field ('author_current_module') associated with any comment ...
user avatar
0 votes
0 answers
32 views

Query ACF relationship field - Comparator IN - Value array

I have two custom post type with a relationship custom field to linked them. I try to do a query based on this custom field using the comparator IN and some IDs in an array, but so far with no success....
user avatar
  • 5
0 votes
0 answers
34 views

how to enable custom fields in the Gutenberg post editor

Apparently (from this website); To view your custom fields using native WP functionality, click the settings button (three dots) and then go to options, where you can enable the Custom Fields box. ...
user avatar
  • 1,750
0 votes
1 answer
25 views

finding and using post type fields in Wordpress

Sorry if this question is repeated, i asked on stackoverflow before but then i found out this place and got a message to wait before posting again, maybe it was just a bug. I am working on a premade ...
user avatar
1 vote
0 answers
12 views

Can we create a WordPress read-only virtual field derived from three other fields?

Our app has three different dates representing three key dates for a Project (one of our PODS CPTs). One of the common calculations we make is deriving an overall "Status" of the project ...
user avatar
1 vote
0 answers
18 views

Cannot add custom field to "orderby" parameter in Rest API

My goal is to order a list of stars based on their distance from Earth, so I have created a "distance" field. The “distance” field is a meta field I’ve added. Looking at the WP API endpoints,...
user avatar
0 votes
0 answers
17 views

WordPress custom search, search by meta key

I have a search form with two dropdowns showing custom terms and two text fields for custom meta keys, The search work with tax_query but meta_query has no result. Here is the pre_get_posts hooks ...
user avatar
0 votes
0 answers
6 views

Adding a custom meta field with default NULL value which is not selectable

Good morning, I have a jobboard which makes use of the plugin Wordpress Job Manager. I’ve created some custom meta fields for job listings. One of those fields is a select field, where the user can ...
user avatar
0 votes
0 answers
8 views

How do you save the values from custom fields to a products data

So Ive got alot of custom fields on the page to create a product and I’m trying to figure out how to save each field. Also I need to save a few fields as an attribute of the product as I’ve got a ...
user avatar
0 votes
0 answers
21 views

need to find duplicated meta value in custom filed and view the posts that have the same value

I used this code but return blank <?php global $post; global $wpdb; $duplicate_titles = $wpdb->get_results(" SELECT meta_value FROM $wpdb->postmeta INNER JOIN $wpdb->posts ...
user avatar
0 votes
0 answers
30 views

How to show ACF fields in Gridbuilder custom block

I'm using GridBuilder WP (great plugin, average support) to show a grid of a custom post type. Ultimately, I need to show an ACF taxonomy field, and their support have recommended using one of their ...
user avatar
  • 125
0 votes
0 answers
23 views

Adding data to User profile

Some plugins for wordpress add fields to the users profile. For example "Company" or "Store" or "Group". How can I add the values to this fields from a custom a frontend ...
user avatar
  • 1

1
2 3 4 5
73