WordPress API V2 – filter and order by ACF field

You could consider using the rest_{$this->post_type}_query filter hook to modify the result of certain REST API queries. To not mess with existing API calls, you could look at using new query parameters that have not been used. Then, use these parameters in your filter. For example: GET /wp-json/wp/v2/crowdfunding?per_page=6&foo_parameter=bar function my_plugin_filter( $args, $request ) { if … Read more

Custom title in a wordpress page edit mode with ACF fields

ACF has a built in filter for their flexible rows which you may be able to leverage/adjust for your own use on your repeater, or investigate and build your own: apply_filters( ‘acf/fields/flexible_content/layout_title’, $title, $field, $layout, $i ); Their documentation covers this here: https://www.advancedcustomfields.com/resources/acf-fields-flexible_content-layout_title/

How to get posts in backbone where a custom field matches a value?

The REST API endpoint “List Posts” (e.g. GET /wp/v2/posts) does not support filtering the posts by a post meta (or custom field), therefore passing post meta parameters like meta_key and meta_value will by default do nothing. But the rest_<post type>}_query filter can be used to manually add custom meta queries to the query arguments passed … Read more

Create WhatsApp URL dynamically using ACF Pro from different fields

You can used ACF Pro and adding some custom code to your theme’s functions.php file. // Add ACF fields if( function_exists(‘acf_field_group’) ): acf_field_group(array( ‘key’ => ‘group_60aaf3a3f3d4a’, ‘title’ => ‘WhatsApp Fields’, ‘fields’ => array( array( ‘key’ => ‘field_60aaf3aaf3d4b’, ‘label’ => ‘WhatsApp Phone’, ‘name’ => ‘whatsapp_phone’, ‘type’ => ‘text’, ‘instructions’ => ‘Enter the WhatsApp phone number’, ‘required’ … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)