New answers tagged

1 vote

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

You may first check the return value for your ACF User field (allowed_users), in this case the return value should be set for return User ID only, then your code should works.
axcool88's user avatar
1 vote
Accepted

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

I'm quite new to this so I might be the wrong person to answer your question but: get_field('allowed_users') Returns an array of user IDs so you can't directly use in_array() So if you change the if ...
PerK's user avatar
  • 28
0 votes
Accepted

doesn't save custom meta box data wordpress

display_duration_metabox() function seems to be missing the nonce field save_duration_metabox() is looking for in the first two if statements. Add the missing wp_nonce_field(), with the correct name ...
Antti Koskinen's user avatar
0 votes

Custom rest fields not loaded in rest api cpt response

I've ended up with a simple solution. after the query to the DB to get all the desired CPT I'm looping the posts object and inside my loop I get the postmeta I will need to add and append them to each ...
ICTDEV's user avatar
  • 111
0 votes

Custom date column in user table not sorting correctly

Solution I used, based on previous answer by Veerji but making sure only the custom columns are affected. Otherwise default columns’ sorting would stop working. function form_change_user_order($args) {...
Cazuma Nii Cavalcanti's user avatar
0 votes

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

There is one issue I see in your code. Within 'meta_query' you cannot use 'meta_key', but it should be 'key'. For example: array( 'key' => '_reservation_date_hour', 'value' => $...
Mowar's user avatar
  • 149

Top 50 recent answers are included