The exclude tag has no wiki summary.
0
votes
1answer
31 views
Exclude all sticky posts front page twenty twelve
I am attempting to exclude all sticky posts from my front page in twenty twelve theme. I have attempted the following. I am making all changes to the child theme.
To remove the following code from ...
0
votes
1answer
20 views
Exclude a 'portfolio' custom category?
I have a custom post type called 'portcat' and I want to exclude one portcat category ('weather' - ID='5') from the page. I've tried 'category__not_in' => array( 5 ) but apparently this doesn't work ...
0
votes
1answer
39 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
...
1
vote
1answer
92 views
How do I exclude the current post from listing in recent posts
I list my two most recent posts from a widget on the sidebar. When I'm viewing one of these posts from single.php, I want that post to be excluded from the list and instead show the next post in ...
0
votes
1answer
50 views
Paginate wp_query while utilizing post__not_in
I'm currently running a wp_query like this:
<?php
$the_query = new WP_Query( array(
'post_type' => 'photos',
'posts_per_page' => '2',
...
0
votes
1answer
123 views
Display 1 category only with get_the_category (by ID or slug)
After hours of unfruitful Googling, I am asking for your help on this issue.
My objective is to display only 1 category with get_the_category if the category ID matches the ID or slug set in the ...
0
votes
3answers
85 views
using pre_get_posts to exclude
I am trying to use pre_get_posts to exclude categories from posting to the homepage. If I do it like so it works just fine
$query->set( 'cat', '-13,-7,-19,-12,-24,-21,-14');
that is hard coded ...
-1
votes
1answer
81 views
Get first category only and excluding one
How can I get the first category (linked to the category archive page) of a post excluding the category called 'featured'? I found various solutions but I can't combine them properly.
Thanks
UPDATE:
...
0
votes
2answers
120 views
How do I remove a category from a wordpress loop>
I have a question. I need to have, in my archive.php file, a exclusion of a specific category. given what I have now, how would I make that happen?
Here is the code:
<?php
...
0
votes
1answer
68 views
Homepage custom recent news
Is there anyway of telling wordpress, by some plugin or whatever, not to show Recent news from Category X, on my home page?
Or I may do it only by modifying the home.php code?
0
votes
1answer
158 views
Using WP_Query and Query_post for the loop?
I am using the code below to call post from a certain Taxonomy term. My intentions are to mix that into the normal loop.
I'm am not trying to create two different loops, but one loop that displays ...
1
vote
2answers
140 views
Query Posts Exclude Entire Category
I am using the standard wordpress loop that looks like:
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<h2><?php the_title(); ?></h2>
...
0
votes
1answer
68 views
Exclude Authors based off date of last post
I have several writers that range from frequent to one-time writers for my blog. On my Author page, I would like to separate out writers that have not posted an article in 6 months. It would be nice ...
2
votes
1answer
113 views
Exclude post_type from admin comments_list
I'm trying not to show comments from a certain custom post type int the comments list on the admin interface.
I went to the "wp-admin/includes/class-wp-comments-list-table.php" and tried to play with ...
0
votes
1answer
100 views
Exclude posts by post meta value
I have constructed this query to sort posts on the home page by a set position number in a custom field. However, I need to be able to exclude posts with the position set to '0'. Below is the code ...
3
votes
1answer
184 views
Retrieving custom taxonomy in order, but excluding specific tax IDs
I have a function set up and working based off the discussion in this thread: Custom taxonomy, get_the_terms, listing in order of parent > child.
My version includes term links and allows me to ...
0
votes
1answer
82 views
Exclude Author by ID
How can I exclude authors by ID from this:
<?php
//displays all users with their avatar and their posts (titles)
$blogusers = get_users_of_blog();
if ($blogusers) {
foreach ($blogusers as ...
0
votes
2answers
42 views
problems exluding categories
I have done this before but for some reason, it is not working and I can't figure out why. All I am trying to do is exclude some categories from the blog page. I thought this would be a simple matter. ...
-1
votes
1answer
59 views
WP Query Obj: Set value to be unequal | Hide media by admin
I would like to hide all media uploaded by the admin.
I've found an answer to this question to be pretty close. Except that the query returns all media uploaded by a specific (current) user, instead ...
0
votes
1answer
34 views
trouble with my loop
I am trying to exclude categories from my blog page. I have the code all set up and according to the codex, this should work
$string = '-' . implode( ',-', explode( ' ', $data['exclude_categories'] ...
0
votes
3answers
766 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 ...
2
votes
2answers
95 views
Exclude ALL posts from sub categories
Need help with a wordpress-task
I want ALL the posts from sub categories to be excluded.
Example:
Cake
Pie
Apple
Pear
Banana
If i post a post in Banana, i don't want it to show up in Pie or ...
0
votes
1answer
29 views
Problems with explode [closed]
I have a text box in the admin area for entering the names of categories. Right now, this is what is in it
events homepage
Just like that above. Two categories separated by a space. So now I am ...
1
vote
0answers
66 views
Exclude image titles from search results
I would like to exclude image titles from search results. For instance, if I have an image called image-wikipedia.jpg, right now, if I search for Wikipedia the story that uses that image is returned ...
1
vote
0answers
182 views
Exclude posts with taxonomy term from appearing on home page query
I am really confused about this one, I am usually pretty good at working out basic queries but I can't seem to work this one out.
Please see below my index.php query. Now it is not your basic query ...
1
vote
2answers
232 views
Exclude Tags from get_the_tags
While following this article to get tags by date, I was wondering if I could exclude certain tags from what gets returned. The point is to have trending tags but some tags will always be there and I ...
0
votes
1answer
75 views
Exclude pages by menu order
i have a "Default Page Generator" on theme activation i have created...
in that file i set 'menu_order' for each page.
i want to exclude pages with menu order bigger then 50 from the default ...
1
vote
1answer
204 views
Exclude One Category and its Subcategories using WP_LIST_FILTER
I need to exclude a category and its subcategories in posts.
This is the code I'm working on and it works:
<?php
$categories = wp_get_post_terms($post->ID, 'category');
...
1
vote
1answer
169 views
Do not allow to search certain words
I would like to delete (not allow) searches with certain keywords (eg "of", "a").
If the search is done using exactly these terms, do not return anything or redirect to 404 page ...
Thanks guys.
1
vote
1answer
135 views
How to exclude posts from a category when using this particular format
I'm trying to exclude posts from a certain category from being displayed on my home.php.
The code that is in my theme is as follows:
query_posts(array('post__not_in' => $featured_posts_array));
...
0
votes
1answer
305 views
gallery shortcode exclude not working
I'm using this bit of code on single.php:
$params='[gallery link="file" size="my_thumbnail_small" exclude="'.$featuredId.'"]';
$gallery = do_shortcode($params);
echo $gallery;
But nomatter what I ...
0
votes
2answers
182 views
Exlude pages from wp_list_pages
in a blow I'm working on there is a navigation menu made of pages and subpages. I didn't code it, so I'm not completely sure how it works, but after reading some code it seems that the menu is ...
0
votes
1answer
237 views
Alter secondary loop to exclude posts from current page category
The below code is taken from sidebar.php where it outputs random posts from multiple categories and excludes the current post from showing up. This works great but how do I alter this loop to exclude ...
0
votes
2answers
1k 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
194 views
exclude categories from search results
I have the following function, I need to exclude categories from it because it works across the site in several different places. How can I do that?
// allCategories(): return an array of categories ...
2
votes
2answers
1k views
List posts by category exclude current post
I'm trying to get a list of posts from one category, echo the title and the permalink of all posts on that category but exclude the permalink and the post name IF the current post is on that list.
It ...
0
votes
2answers
202 views
Exclude category from category archive
I've included the code I'm working with below. I had some custom work done on a wordpress site of mine. This is a page that shows an list of the categories along with images and a short description. ...
-2
votes
1answer
202 views
How to define category ID in an array?
I have the following:
<?php if ( array( 'is_category', 'is_tag' ) ) { ?>
What I want to do is (that doesn't quite work):
<?php if ( array( 'is_category('13')', 'is_tag' ) ) { ?>
So ...
0
votes
1answer
75 views
Want to exclude slider from page.php in header
I know this is a dumb question, but for the love of my life, I can't get the code to work. I have three page templates: home, page and another page-by category. I have a slider that I want to excluded ...
0
votes
2answers
463 views
How to exclude/filter a tag from get_the_tag_list()
Does anyone know how to exclude/filter a tag from the HTML string generated by get_the_tag_list()?
http://codex.wordpress.org/Function_Reference/get_the_tag_list
Any help much appreciated.
1
vote
1answer
53 views
Exclude category from fucntion
QUESTION
Hey guys, I have this function and I need to exclude 2 categories: 81 and 82. Can You help? :)
CODE
function has_related_same_cat_posts(){
global $post;
$categories = ...
0
votes
2answers
721 views
Exclude category from query
PROBLEM
Hey everyone I have the wp loop to display posts, but I need to exclude category 81.
I tried: query_posts('cat=-81'); ?> before the loop but the pagenavi is broken and it doesn't work ...
0
votes
1answer
670 views
Exclude specific taxonomy term when using wp_get_post_terms
i have a single-post_type.php file where i constructud a breadcrumb (or similer to)
i am currently using this to get the terms of this taxonomy:
$terms = wp_get_post_terms( $post->ID, ...
1
vote
1answer
1k views
Dynamically excluding current page id
I'm attempting to create a "related posts" section on pages using query_posts. I'm wanting to use this simply because we want to show random posts from one category on one page, so a plugin would be ...
0
votes
2answers
176 views
Add exception for specific tag
I'm using this piece of code to generate Related Posts by looking at the tags of posts. The problem is I have use a tag named Featured in order for a post to show up in a slideshow. So posts are ...
0
votes
3answers
2k views
Exclude the category from the Wordpress loop
Question
Hi everyone, I have this code for the loop, and I need to exclude a category 4 from this loop. Please help :)
Code that starts the loop
<?php if(have_posts()): ?>
...
0
votes
1answer
73 views
Exclude the category in Wordpress
My question:
This code retrieves the categories. I need to exclude the category number:81. Is there an easy way to exclude it in this code?
<?php
$cat_lists = retrieve_cat_data_sp( ...
0
votes
1answer
188 views
Conditionaly exclude post from certain category from homepage sidebar?
how to exclude posts from one category to not show on sidebar on homepage only when I explicitly dont want that particular post, in all other cases post will be displayed.
I had try with plugin "WP ...
1
vote
1answer
470 views
Exclude custom taxonomy tag from loop
I have the following code at the beginning of a loop:
<?php query_posts('showposts=3&cat=84'); ?>
<?php $posts = get_posts('category=84&numberposts=3&offset=0'); foreach ($posts ...
1
vote
2answers
714 views
Exclude Category From Home Page, Display Posts on It's Own Page?
I created a new category with the ID of 57, how do I exclude this category from the homepage/blog and then list the posts from this category on its own page?
this is what my index.php looks like
...

