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