Skip to main content

Questions tagged [custom-field]

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

0 votes
1 answer
54 views

Adding the numerical values from a custom field from all posts in a category

I have a blog that is documenting an airplane build process. Posts describe the work done each day, and are organized into a category for each component. Each post has a custom field for hours logged ...
John's user avatar
  • 103
2 votes
1 answer
342 views

Block Editor - Meta values not saved, meta changes to empty array on update

Issue TL;DR I have a block that updates meta values, but when I click 'update', the values are not saved for the post. Additionally, the meta values I get from useEntityProp load as an object with ...
Baerkins's user avatar
  • 163
0 votes
0 answers
351 views

warning: trying to access array offset on value of type bool ACF field image group

I have a problem with an acf function for displaying an image by array. I can get my image to work well when I upload it to the field associated with it. On the other hand, when I don't put an image, ...
user avatar
0 votes
2 answers
45 views

How to conditionally display an ACF custom textarea contents only to those users chosen from an ACF User field

How to conditionally display an ACF custom textarea contents only to those users chosen from an ACF User field. I have an ACF User field (allowed_users)that author's can multiple select when they ...
Pete's user avatar
  • 1,028
0 votes
0 answers
13 views

Category display using conditions

I have a custom post type(events) created and has taxonomy(event-categories) with parent and child categories. Since im not good in coding, i will try to understand all the help from here. So what im ...
Bordzee's user avatar
0 votes
1 answer
62 views

doesn't save custom meta box data wordpress

My WP doesn't save my meta box data. I see the metabox and the field, but the data doesn't saving. Somebody could help me? Thank you. This is the code: <?php // Function to add a metabox function ...
Tivan Cell's user avatar
-1 votes
1 answer
33 views

Custom rest fields not loaded in rest api cpt response

I have a custom endpoint that will be used from my vue app to load custom post type I've registered using a custom plugin. I need to add some custom fields to the response when the posts are loaded ...
OHICT's user avatar
  • 133
0 votes
1 answer
280 views

Display WooCommerce Order Custom Field In Template (HPOS)

Until now, I used this code to display a order custom field value inside a template: <?php echo esc_html( get_post_meta( $order->get_id(), 'my_custom_field', true ) ); ?> When enabling HPOS ...
Daniel's user avatar
  • 1
0 votes
0 answers
49 views

Use Custom Field to Display Post Loop

In my custom template I have created a menu which is a row of 10 horizontal tabs. Each tab shows a date which is defined using an ACF datepicker field in the post. I have also created a custom post ...
SavPhill's user avatar
  • 118
0 votes
1 answer
22 views

Query custom fields with three dates - start and end does not work

I have tried to make a reservation system for a book a table in restaurant. But, I have a problem when I try to see/ make new reservations in an specific day - in showing me which table are free at ...
Fujitsu09's user avatar
0 votes
1 answer
33 views

Sort wp_query of two post types using meta datefield for one and date for the other - possible?

I have two queries that result in id-arrays that I merge into a common array which, in turn, has all the posts I need from the two post types (posts, events). However, in the sorted list I would like ...
yms's user avatar
  • 35
0 votes
0 answers
12 views

update and sanitize a value of a select field

I'm trying to update and sanitize the value of a select field, this custom field is in user-edit-php I,m using this code update_user_meta( $user_id, 'saldo', sanitize_text_field( $_POST['saldo'] ) ); ...
Andrea Sacconi's user avatar
0 votes
1 answer
18 views

Why the value of the selector doesnt remain visible in the custom field after I edit the post?

I have a number custom field with a selector, I should select the number of bedrooms, when I edit the post the meta key value is saved correctly (I can see the number of bedrooms near the ...
Andrea Sacconi's user avatar
0 votes
0 answers
126 views

How can I display a layout differently depending on whether the user is on Mobile or PC?

I am currently working on a website for which I have to display the different features of a product. When imagining the design, I had a very different layout for mobile and PC that would, in my ...
almecin's user avatar
0 votes
0 answers
11 views

A custom field that can search through many other related post types?

It's been half a decade since I tried to make a wordpress site, and in the past I would use Advance Custom Fields to solve a very specific problem I'm about to ask. I want to see if there's a newer ...
learningtech's user avatar

15 30 50 per page