Advertisement
Guest User

Untitled

a guest
Dec 12th, 2016
300
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.41 KB | None | 0 0
  1. function wt4u_tasks_admin_notice() {
  2.  $all_tasks_args = array(
  3.   'post_type' => 'post',
  4.   'posts_per_page' => '9999',
  5.  );
  6.  $all_tasks_query = new WP_Query( $all_tasks_args );
  7.  $all_tasks_count = 0;
  8.  if ( $all_tasks_query->have_posts() ) {
  9.   while ( $all_tasks_query->have_posts() ) {
  10.    $all_tasks_query->the_post();
  11.   }
  12.   wp_reset_postdata();
  13.  }
  14. }
  15. add_action('admin_notices', 'wt4u_tasks_admin_notice');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement