The tag has no usage guidance.

learn more… | top users | synonyms

0
votes
1answer
28 views

How to get post with slug and exclude categories

I want to do a query to get posts with a slug and category__not_in. Here's what I do: $query = array( "name" => "test", "category__not_in" => array( 15 ) ); query_posts( $query ); ...
0
votes
1answer
21 views

Exclude latest post from WP_Query taxonomy term loop

Any help would be greatly appreciated! I have a Custom Post Type 'video', with a taxonomy 'tax-video' and I'm looping through posts in the sub-taxonomy term 't-o-t-w'. I need to exclude the ...
0
votes
0answers
16 views

Exclude Featured Image Attachments from Wordpress Search Results

I'd like my search.php page to show all attachments except featured images (because they appear as duplicates of the posts that use them). I have seen some examples that do this for a query, but ...
1
vote
0answers
15 views

Reload parent categories list in (new) post

I have a question about parent categories list in a (new) post. I have few categories what I would like to exclude from parent categories list. When I open (new) post page, few categories are ...
0
votes
1answer
11 views

Exclude category from DB query

I have next code: $drivers_all = $wpdb->get_results("SELECT DISTINCT meta_value FROM wp_postmeta WHERE meta_key = 'driver'") With this one I get the values of all fields “driver”. How can I ...
0
votes
1answer
30 views

Exclude posts with certain meta data from search results

I'm trying to exclude al posts with certain meta data from the search results but so far it's not working. Here's the code I'm using: function ZoekGeenLegeItems( $query ) { if( is_admin() || ...
-1
votes
2answers
85 views

Call function on a single page

How can I apply this function to a single page ID: function exclude_jobs_locations($args){ $exclude = "40"; $args["exclude"] = $exclude; return $args; } ...
0
votes
1answer
47 views

$query->set( 'post_type', 'post' ); not working

I am trying to exclude pages from my search result with this function: function posts_for_current_author($query) { global $user_level; if($query->is_admin && $user_level < 5) { ...
-3
votes
1answer
41 views

hide particular category post from front page only [closed]

i have setup a new wordpress blog and have few categories one is called news and it updates too frequently and less important so I want news category posts to be excluded from my home page only and if ...
0
votes
3answers
120 views

Exclude a specific tag from the get_the_tags list

I am building a child theme for my personal use. Not very familiar with php, can only do basic things based on logic. I need to exclude one tag from being displayed on the tag list on a single post. ...
0
votes
1answer
982 views

Category menu that filters out empty categories

I'm trying to build a menu which can be administered from the menu editor, but gets filtered before being output. More specifically the menu contains Woocommerce product categories, organised into a ...
0
votes
0answers
58 views

Exclude a WordPress folder from the rewriting rules?

My teammate and me would like to work together on the same project. I am the frontend integrator and my friend is the backend developer. We would like to work in this way (if possible) : 1) I create ...
1
vote
2answers
1k views

Exclude Posts From Specific Category from Next and Previous post links

I've been searching for this a lot...but all I get is not what I need. I simply want to show next and previous links on single.php (from all the categories, based on publish date, not just in the ...
1
vote
0answers
38 views

Exclude Category filter from Portfolio section

I am stuck with this since hours and found lots of forum entries about NOT IN, WP_Query, category__not_in portfolio, editing JS/ CSS in Theme options or having bits of code to add to portfolio.php, ...
0
votes
2answers
125 views

Exclude some categories from the post page

I have created a page called "videos", this is set as the post page where all post should show up. That´s fine, but I want to exclude all posts from two of the sites categories. I tried this code, ...
0
votes
1answer
67 views

wp_list_categories not excluing multiple ids

I recently updated to WP 4.4 and im using this code: $args = array( 'orderby' => 'ID', 'show_count' => 1, 'taxonomy' => 'portfolio-type', ...
0
votes
1answer
20 views

Exclude Everywhere but Admin Area?

Currently I have this: if ( ($query->is_home() && $query->is_main_query()) || $query->is_archive() || $query->is_search() ) { ... } I tried !$query->is_admin() but this didnt ...
-1
votes
1answer
34 views

Show all tags but exclude a certain tag

I'm trying to get it work with tag__not_in but it doesn't work. $args = array('order' => 'DESC', 'orderby' => 'count', 'number' => '70', 'taxonomy' => 'post_tag', ...
1
vote
0answers
61 views

'exclude' argument is not working with get_posts for a custom post type

I'm trying to use get_posts to get a random list of customPostTypes but I want to exclude some id's. I already try the query with the following options: Current) 'exclude' => array(622, 621) --- ...
0
votes
1answer
65 views

Exclude from wp_list_pages by template

I have a series of "Thank You" pages which result from different form submissions. I would like to be able to exclude these from sitemaps based on their template. Specifically, and as an easy example, ...
0
votes
3answers
284 views

Skipping first 3 posts in wp query

Here's the query i have used. <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $wp_query = new ...
0
votes
1answer
106 views

Avoid repeated post on page 2 when excluding one on page 1

On the site we're developing, infinite scrolling is activated by Ajax/JavaScript. $('#inifiniteLoader').show('fast'); $.ajax({ url: "<?php bloginfo('wpurl') ?>/wp-admin/admin-ajax.php", ...
2
votes
1answer
41 views

Exclude file from theme editor

Is possible to exclude some files from being viewed and modified in the theme editor?
0
votes
0answers
24 views

Hide event from specific category when adding events to main RSS feed

I used the following snippets to add events from The Events Calendar to my main RSS feed so that visitors can subscribe to post for the site via Jetpack: // Add Events to RSS Feed function ...
0
votes
2answers
673 views

How do I exclude posts by custom field value?

I need to exclude posts that have a custom field 'city' value of 'Melbourne'. After much searching I think the solution might consist of 2 parts. In functions.php : A function to get the post IDs ...
0
votes
1answer
148 views

How exclude 3 latest posts of a category in query_posts

I am newbie in wordpress development, and usually I use query posts with simple commands. I have a slider in home page which shows 3 latest posts form 'featured' category. I have also a news box ...
0
votes
0answers
24 views

remove file plugin include

i use a plugin that include template.php file , i want to replace this with a new one in my template directory or remove it class jqueryTimelinrLoad { public function shortcode($atts, ...
1
vote
2answers
422 views

pre_get_posts : 'post__not_in' doesn't work with global variable

I'm trying to set a post__not_in which use a global $popular variable, defined in the index.php. -index.php- $popular[] = 1 //post id=1 $popular[] = 2 //post id=2 $popular[] = 3 //post id=3 ...
0
votes
1answer
71 views

Text with special class as excerpt (or exclude special class)

I am new in Wordpress and I am trying to customize my own theme. All my posts are starting with a kind of content that I don't want to become the excerpt. It is kind of header. Is there a way to ...
0
votes
2answers
152 views

how can I use WP_Query to exclude a specific tag.?

I have the following working code for a query on a specific category and tag slug: $args = array( 'category_name' => $cat_name, 'tag' => $tag_name, 'post__not_in' => $sticky ); $my_query ...
0
votes
1answer
75 views

Exclude Custom Post Type & Pages From Auto-Tag Function

I am happily using this bit of code to auto-tag posts by author (thank you again cybmeta): add_action( 'save_post', 'add_authors_name'); function add_authors_name( $post_id ) { $post = get_post( ...
4
votes
1answer
2k views

Exclude Specific Term from Search

It is possible to search for posts with a specific term by appending the URL with: ?&term=abc Is it possible to do the opposite and search excluding a specific term? Something like: ...
0
votes
1answer
210 views

Filter keywords from search query

I have search over the google, somewhere out there and here(http://wordpress.stackexchange.com). But, i can't seem to get the solution i was looking for. I would like to ask that, is there any ...
0
votes
2answers
44 views

Exclude post category in a blog page

I have two links in "news" where all the news posts goes "blog" where the rest goes just wanted to exclude the category "news" in the blog page I use the code $news = new WP_query ...
0
votes
2answers
402 views

Conditionally exclude post from specific category on home page sidebar?

I want to exclude posts from one category. These posts should not show in the sidebar on the homepage only when I explicitly don't want that particular posts to show. In all other cases these posts ...
0
votes
1answer
75 views

Exclude Tags by Array

and thanks for any help!. I'm trying to display all of the tags except ones that start with a token ("Author: "). I have figured out how to exclude a single tag (just typed it into the exclude ...
-1
votes
2answers
543 views

Cannot exclude particular post from loop of custom post type

I have a custom post type (from a theme installed by previous developer), and here is the code of loop which retrieve the post and display them. <?php // Counter $post_count = 1; // Query ...
2
votes
1answer
517 views

Excluding a category from next and previous post links

I am trying to figure out the code to exclude a category from my next and previous post links. My code for the next and previous is as follows: <div class="next_prev_cont"> ...
1
vote
2answers
346 views

Query: offset post list, unless it's a specific category

Here's my code: <?php query_posts(array ('showposts' => '1', 'cat' => '-11')); if (have_posts()) : while (have_posts()) : the_post(); get_template_part( 'content', 'archives' ); ...
0
votes
1answer
215 views

Use posts_where to exclude posts ids from wp_query

I want to use posts_where to exclude an array of posts ids from all queries in my site. The array containing the posts ids depends on the user that is logged in. Can someone please tell me how to ...
0
votes
2answers
4k views

Exclude current post ID from loop in sidepbar.php

Currently all the below bit of code is doing is showing 3 random posts from the same category that the current page resides in. So if the current page falls in the artists category, for example, show ...
0
votes
1answer
46 views

Loop doesn't exclude the specified category in home page

Oh, hello! I want to show the three most recent blog posts in the home page, excluding the "featured" category, which has the ID 8. In order to see the ID for that category, I went to Posts > Category ...
0
votes
0answers
48 views

How to exclude sidebar from pages?

I put some page id's in exclude page in appearance -> widget -> pages -> left sidebar. But these pages still exist in sidebar which is not to. Site: http://goo.gl/ek63ye Here's the code of left ...
12
votes
2answers
1k views

How do I exclude plugins from getting automatically updated?

There is an opt-in filter that allows all plugins on my site to receive automatic updates: add_filter( 'auto_update_plugin', '__return_true' ); I like this feature, but I don't want all my plugins ...
3
votes
3answers
13k views

Exclude post ID from wp_query

How can I exclude one specific post from a WP_Query query? (For example, show all posts apart from a post with the ID 278) I've tried the post__not_in argument but it just removes all posts.. Any ...
0
votes
1answer
155 views

How to exclude one post format from search result?

I need to exclude one post format from Wordpress search results. Any suggestions on how to solve this issue?
0
votes
1answer
149 views

How to exclude posts from category posts count

I have a custom loop to display posts based on a custom field. My problem is that if i have 2 posts and exclude 1 from the loop the category posts count (categories list widget with show count enable) ...
0
votes
1answer
467 views

Exclude category from foreach loop

How can I exclude one category from this loop wher I list my custom type projects by year ? <?php foreach(posts_by_year() as $year => $posts) : ?> <h3><?php echo $year; ...
1
vote
4answers
6k views

Exclude the category from the WordPress loop

I have this code for the loop, and I need to exclude a category 4 from this loop. Any suggestions on how to achieve this? Code that starts the loop <?php if(have_posts()): ?> <ol ...
1
vote
0answers
654 views

Exclude custom taxonomy term posts from custom post loop

I have a custom post type set up called projects with a custom taxonomy called categories that has a number of terms. For one of them called archive I would like to remove its associated posts from ...