Using a shortcode to get User Emails by role as specified in the shortcode, need help to allow for multiple roles

If you’re trying to get users with all roles (in your example, administrator and author), your code looks like it should work. If you want users with any role (administrator or author, you’ll need to split the string in the role attribute into an array using explode(), and use the role__in array. Something like this … Read more

Is It Possible to Use the Block Editor’s Notification Feature to Send Another Notification After the Post Is Saved?

Yes, but you have to do it Redux- way. Subscribe to post saving action (there are separate actions for save and auto-save) and dispatch a message using dispatch function. Edit: Inside blocks, there are better hooks to use, like useSelect. But, outside the block, in general block editor environmentm you have to use subscribe. In … Read more

Custom Gutenberg block with nested InnerBlocks renderAppender not displaying add button

In gc-slider2/index.js, I removed the templateLock=”all” from the InnerBlocks, and it is now displaying the plus sign for the gc-slider-items block. <InnerBlocks template={SLIDER_TEMPLATE} allowedBlocks={ [ ] } /> Which leaves me with a different problem of two add block plus signs. See Gutenberg Innerblocks notallowedblocks on parent but allowedblock on child

Custom Search Function in WordPress Returns No Results

Here’s the right code I made a mistake with s param function custom_search_query($query) { if (!is_admin() && $query->is_main_query() && $query->is_search()) { $search_query = get_search_query(); // Retrieve the search query $api_url=”https://api.adenwalla.in/api/search/data”; $args = array( ‘body’ => json_encode(array(‘query’ => $search_query)), ‘headers’ => array(‘Content-Type’ => ‘application/json’), ‘timeout’ => 60 ); $response = wp_remote_post($api_url, $args); $body = wp_remote_retrieve_body($response); $results … Read more

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