Where to find documentation for CPT block template? (PHP)

You can’t find that documentation because it doesn’t exist. It doesn’t exist because that’s not how it works, and it would require extensive duplication to set up. So to figure out what you need to put, figure out what it is in Javascript/JSON, then translate it to PHP. The pattern is: [ ‘block name’ [ … Read more

WP grandchild categories in nested ul li

You can’t do it using simple for/foreach loops. This is an excellent example where a recursion can help: function get_categories_list( $parent, $use_toggle = true ) { $result = “”; $categories = get_categories( array ( ‘parent’ => $parent ) ); if ($categories) { foreach ($categories as $category) { $name = $category->name; // HERE THE RECURSION IS … Read more

Get the post ID and display the images

As far as I know get_field() function will return the response according to the current post (There’s no need to specify the post ID). But if you want to specify the post ID then you have to type it in the second argument, like: get_field( $selector, $post_id ); So your code would be like this: … Read more