Function to delete a post, it’s children and it’s grand children (half way there already)

Here’s what you can do: get all the ids of direct children get all ids of grand children combine trash function trash_redirection_frontend($post_id ) { if ( filter_input( INPUT_GET, ‘frontend’, FILTER_VALIDATE_BOOLEAN ) ) { $args = array( ‘posts_per_page’ => -1, ‘post_parent’ => $post_id, ‘post_type’ => ‘bucket’, ‘fields’ => ‘ids’, // get only the ids, it’s all … Read more

is_search called incorreclty

Hey Mike and welcome to the WordPress Stack Exchange! First, it’s good form to always include the code you use (or a link to where you found it) if you mention it in your post. This error comes up when you use it prior to the search being run. The WordPress Codex doesn’t have a … Read more

wpdb print all post meta

This isn’t really a WordPress question as it’s just standard SQL, so it doesn’t really belong here, but I have some points to make about your use of $wpdb->prepare() so will answer the question. So, let’s look at your WHERE clause, isolated, with values substituted, and indented to reflect how it will be interpreted: WHERE … Read more

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