Rerender core Templates with with ToggleControl but it doesnt recognize block type

Neat implementation 🙂 The issue responsible for that error is here: const [template, setTemplate] = useState([ [“core/heading”, { placeholder: “Three CTA Block” }], [“core/columns”, {}, […column]], ]) As well as here: setTemplate([ [“core/heading”, { placeholder: “Three CTA Block” }], [“core/columns”, {}, […newColumn]], ]) If present, the third element of a block template block item array … Read more

WooCommerce maintaince mode by using php

You need to replace the following: if ( ! current_user_can(‘administrator’) ) { with if ( ! current_user_can(‘manage_options’) ) { This is because there’s no such capability as administrator. There are a couple of administrator-only capabilities, and manage_options is a reliable one to use.

list of custom post by custom field in frontend

The main issue is that you’ve mixed up two methods of querying posts. You’re querying the correct posts here: $posts = get_posts(array( ‘numberposts’ => -1, ‘post_type’ => ‘assessment’, ‘meta_key’ => ‘customer’, ‘meta_value’ => $current_user_id )); But then the posts you’re actually looping through are queried here: $the_query = new WP_Query( $args ); Where $args is … Read more