The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
2answers
293 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
108 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
269 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
229 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
350 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
213 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
47 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
93 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
37 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
4k 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
3answers
478 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
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
0answers
101 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
284 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
515 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
125 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
361 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
286 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
185 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
397 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
486 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
387 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
2k 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
346 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 ...
0
votes
2answers
678 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
366 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
134 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
3answers
951 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
85 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
1answer
1k 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
3k 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
281 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
4k 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
82 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
2answers
273 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 ...
1
vote
1answer
767 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
819 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
367 views

Exclude post format from get_posts

The title basically says it all. I know I can use the following to get posts from the aside post format: $args = array( 'post_type'=> 'post', 'post_status' => 'publish', 'order' ...
3
votes
1answer
1k 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: ...
1
vote
1answer
870 views

Exclude featured image from gallery code stops Lightbox from working

I was looking for a solution to exclude the featured image/thumbnail in each post, so I found this great piece of code and added it to functions.php. It worked perfectly except for one thing: it ...
1
vote
1answer
373 views

Exclude featured image and custom field from this get_attachment query

Is there a way I can exclude the post thumbnail AND a custom field with the value "_lm_comm_logo" from this query that pulls all of the images associated with a particular post? <?php $args = ...
0
votes
1answer
774 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 ...
1
vote
2answers
1k views

Exclude the parent custom post-type posts only

Not sure if this is possible without some form of hard-coding but I have a custom post-type called 'city'. Within the 'city' post-type I have some parent post (e.g. England, America and China) and ...
0
votes
1answer
293 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 ...
0
votes
1answer
185 views

Exclude admin from the top commenters list [duplicate]

Possible Duplicate: Top Commenters: exclude admin While back I found this hack here to display top commenters. It works fine. But I would like to exclude the admin from the commenters list. ...
4
votes
2answers
5k views

Dynamically exclude menu items from wp_nav_menu

I tried looking for info about how to exclude/remove nav menu items from custom menus, and the only thread I found did not have any answers that were useful to me. 1. Background: I put together a ...
1
vote
4answers
3k views

is there a quick way to hide category from everywhere?

I want to get rid of some posts, old ones, that I don't really want to keep. I was thinking to create a category named 'old' and use it as a garbage can to trash everything I don't like from old ...
2
votes
0answers
280 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 ...