Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2019
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. if (($_SERVER['REMOTE_ADDR'] == '1.1.1.1') {
  2.  
  3. function exclude_single_posts($query) {
  4. if (is_front_page() || is_archive() || is_search() || is_single()) {
  5. $query->set('post__not_in', array(1, 2, 3, 4));
  6. //
  7. }
  8. }
  9. add_action('pre_get_posts', 'exclude_single_posts');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement