Wrap Gutenberg blocks both frontend/backend (PHP approach with ACF)
Wrap Gutenberg blocks both frontend/backend (PHP approach with ACF)
Wrap Gutenberg blocks both frontend/backend (PHP approach with ACF)
Meta Queries are nested arrays. See the WP_Query section on meta queries. Option 1 Use meta_key and meta_value directly in the query arguments, not as a meta query. $student_query_args = [ ‘post_type’ => ‘student_list’, ‘post_status’ => ‘publish’, ‘posts_per_page’ => 100, ‘order’ => ‘DESC’, ‘meta_key’ => ‘program_id’, ‘meta_value’ => 5317, ]; Option 2 The meta query … Read more
Here you can get separated data from timestamp using date(); function. you can apply different fonts each value. <?php $timestamp = get_field(‘date_time’); $day = date(‘d’, $timestamp); $mon = date(‘m’, $timestamp); $year = date(‘Y’, $timestamp); echo “Day : “.$day.”<br>”; echo “Month : “.$mon.”<br>”; echo “Year : “.$year; ?> if $timestamp value “1567503270” then output will be … Read more
I believe you need the af/email/before_send hook. I found this solution here: https://gist.github.com/mishterk/70bb486baac349c29b684346b77826ce Rather than permanently modifying the email saved with the form entry, you can simply modify the message field to encode the email. For example: <?php // Set the form key you wish to target $form_key = ‘form_5d97cf9edc0a8’; add_action( “af/email/before_send/key=$form_key”, function ( $email, … Read more
It’s everything OK with get_posts() since it creates the single WP_Query instance per call. You can check the query by creating that instance: <?php $test_query = new WP_Query( array( ‘post_type’ => ‘post’, ‘posts_per_page’ => -1, // any number, does not matter ‘post__in’ => $ids, // should be an array! ) ); echo $test_query->request; Adding ‘meta_query’ … Read more
Ok got it, for user field actually one has to add “user_” before the id for it to work. So in my case: update_field( $cover_custom_field_key, $cover_id, “user_2” );
Organize media library into folders and get folders via WP Rest API?
You can generally edit the capability of the tinyMCE WYSIWYG Editor for ACF with the acf/fields/wysiwyg/toolbars hook. By default the WYSIWYG editor has two toolbars, “Full” and “Basic” but you can also create you own(see docs) Removing the formatting option for the “Full” WYSIWYG editor can be accomplished like this: add_filter( ‘acf/fields/wysiwyg/toolbars’ , ‘my_toolbars’ ); … Read more
Add PDF to ACF image field from file url
If I’m understanding your approach correctly, you seem to have hard coded music items? I’m suggesting that you create custom post type, which whould be Music. You should also add custom taxonomy for the post type Music. After this you can add music items under Music post type and set music items’ genres as taxonomy. … Read more