0
votes
1answer
20 views

Exclude categories by ID

I've searched this site and tried all kinds of ways to exclude categories 1 and 7 from this list, but nothing is working. No errors but doesn't hide the cats either. Categories 1 and 7 are not empty, ...
0
votes
4answers
73 views

How to exclude categories from recent posts, recent comments & category widgets?

I use the bellow function (thanks to @helgatheviking!) to exclude categories from the wordpress loop. It works very well - posts of selected categories are excluded from the loop on the main blog ...
-1
votes
1answer
16 views

Excluding cateory not working on my site. how to solve this? [closed]

I am using my own wordpress theme. I am trying to exclude some categories on my author.php I am using the following code for that purpose. $paged = (get_query_var('paged')) ? ...
1
vote
1answer
78 views

exclude post from displaying in loop if it is in a category, but not in many categories

I am searching how to exclude posts from displaying in a loop if them are in a category x, but not in many categories... The Problem: if I do exclude posts i.e. out of category 5, all posts are listed ...
0
votes
0answers
80 views

Exclude Categories from wp_list_categories()

in before: I already searched for this answer her but couldn't find a thing that worked for me. I have a Lot of Categories and Child Categories. I use them to give a Location, Country, Type of ...
0
votes
1answer
159 views

WooCommerce Hiding A Certain Category From Being Displayed On Single Product

If I go to wp-content/themes/theme-name/woocommerce/single-product/meta.php then I see this code:- <?php /** * Single Product Meta * * @author WooThemes * @package ...
0
votes
1answer
79 views

List post wit the same category but exclude parent

I have the followind code: <?php global $post; $cat_ID=array(); $categories = get_the_category(); //get all categories for this post foreach($categories as ...
0
votes
1answer
359 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
2answers
688 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
98 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?
1
vote
2answers
246 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
37 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
1answer
172 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
299 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
2k 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 ...
-2
votes
1answer
316 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 ...
1
vote
1answer
78 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
1k 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
3answers
3k 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
80 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( ...
1
vote
2answers
784 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 ...
0
votes
1answer
730 views

Functions.php: Exclude Category from “Blog”

So it's quite obvious to how exclude certain categories from within a template, but I don't want to have to modify 4 templates so that they ignore a certain category. Is there a way that I can ...
0
votes
1answer
248 views

How to have a category not show up in query post with page panigation?

Basically I have this loop that shows all post. Inside of it I want to exclude post's from categories including shirts and hoodies, also the gallery category. Here is what I have so far. the code ...
2
votes
0answers
250 views

How to set post expiration date and time and move the page to archive after expiration [closed]

My requirement is to move the certain posts from home page category after specified date and time. I have two category News and Events. Both have so many posts and i dont want to show all the posts ...
0
votes
1answer
653 views

How can I exclude a category from the main loop with the category name & not ID?

I'm having a dozy of a time on this one and have finally had to break down and ask my first question. Usually I can find an answer on here, but this time I need some help. I'm trying to exclude a ...
0
votes
2answers
3k views

exclude category from get_posts?

getting posts by cat with get_posts but need to exclude another cat called london or id 10. is this possible? best, Dc. // array(7,-10) $laargsM = array('category' => 7, ...
0
votes
1answer
360 views

User level categories

I am using ClassiPress to create a different type of listing classifieds. I will select manually who can subscribe or not (only a type of leaders for a religious institution). I have four ...
0
votes
1answer
301 views

Better way to exclude category output for post/pages?

I always assumed there was a way to exclude certain categories from being output in the loop using get_the_category, the_category, or one of the term related functions. After looking around it seems ...
0
votes
2answers
1k views

Customize category query in widget

I would like to exclude a category from my categories sidebar widget. If I understand the way this works, the sidebar.php code is not in use since the widget is displaying the categories. (something ...
0
votes
1answer
1k views

Exclude category from drop down list form

I need a bit of quick help. How do I exclude category ID number 50 for example in drop down list form in Wordpress? I have this code and I need to just insert the excluded category id. <?php ...