Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (($_SERVER['REMOTE_ADDR'] == '1.1.1.1') {
- function exclude_single_posts($query) {
- if (is_front_page() || is_archive() || is_search() || is_single()) {
- $query->set('post__not_in', array(1, 2, 3, 4));
- //
- }
- }
- add_action('pre_get_posts', 'exclude_single_posts');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement