2 votes

WP_Query sort by ACF date field (newest first) with blank dates first

I ended up using these WP_Query arguments: 'orderby' => 'meta_value', 'order' => 'ASC', 'meta_key' => 'custom_date', 'meta_query' => array( 'relation' => 'OR', '...
Space's user avatar
  • 129
1 vote

add_post_meta unique value for all custom posts

I finally solved it by doing the validation before the registration process. In this way, the registration does not start until the fields are validated: /** Validation fields **/ function ...
JJMontalban's user avatar
1 vote

add_post_meta unique value for all custom posts

you can use the save_post hook to validate the uniqueness of email and phone fields before saving the post. Replace seller with your actual post type slug and add below code in functions.php file // ...
vijay pancholi's user avatar
1 vote

Custom Field in Page Title

Use the wp_title filter, which passes the current title, separator, and location as arguments. It then appends the custom field value to the title if the conditions are meet. For more details :- Visit ...
vijay pancholi's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible