Pastebin is 300% more awesome when you are logged in. Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jul 25th, 2012  |  syntax: None  |  size: 0.42 KB  |  hits: 30  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2. $post_type = 'post';
  3. $post_type2 = 'listing';
  4. $post_type3 = 'answer';
  5. $post_type4 = 'question';
  6. global $wpdb;
  7. /**/
  8. $count = $wpdb->get_col( "SELECT COUNT(ID) FROM $wpdb->posts WHERE post_author = '" . $curauth->ID . "' AND post_type = '".$post_type." or ".$post_type2." or ".$post_type3."' or ".$post_type4."' and post_status = 'publish'" );
  9. echo $post_type;
  10. echo $post_type2;
  11. echo $post_type3;
  12. echo $post_type4
  13. ?>