The tag has no wiki summary.

learn more… | top users | synonyms

8
votes
2answers
332 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 ...
4
votes
2answers
6k 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 ...
4
votes
1answer
412 views

Exclude categories from Loop, queries, widgets, post navigation

I recently ha a use case where I needed to prevent a certain category from being displayed in the front-end. In detail I needed to exclude posts assigned to that category from the main query (“the ...
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: ...
3
votes
1answer
103 views

Excludes posts that don't have attachments in the_content()

I'm trying to write a loop that excludes posts that don't have attachments in their content areas. I've got 200 posts in a custom post type called "students". I need to do a query of all students ...
3
votes
1answer
362 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 ...
2
votes
1answer
279 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 ...
2
votes
2answers
3k 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
3answers
504 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 ...
2
votes
1answer
24 views

Default WP search excluding specific characters, is it possible?

I would like to know if it possible to customize the default search module of Wordpress. I've a website dealing with teams and teams' news. Some of those teams has their names written like this ...
2
votes
0answers
288 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 ...
1
vote
1answer
778 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
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 ...
1
vote
1answer
303 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
189 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)); ...
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 ...
1
vote
2answers
825 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 ...
1
vote
1answer
1k views

Exclude Current Post from Recent Posts Loop

what would be the best way to exclude the current post I am viewing from this recent posts query. Thank You! <?php global $post; if (in_category('top-lists')) { ...
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 ...
1
vote
1answer
132 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 ...
1
vote
1answer
360 views

Exclude featured image from attachment loop

For my jigoshop theme I'm able to retrieve the images attached to my product post. However it pulls all images from both the featured image and my metabox images. What I'm trying to do is make it so ...
1
vote
1answer
463 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 ...
1
vote
2answers
306 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> ...
1
vote
1answer
374 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
86 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 = ...
1
vote
1answer
885 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
378 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 = ...
1
vote
2answers
64 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
277 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 ...
1
vote
2answers
54 views

Exclude the first 'n' number of posts of a tag from home page?

Use case (example): Using a separate, custom query my website's home page shows 5 featured posts, tagged 'Highlights (highlights)', followed by the latest posts, from the main query. I don't want the ...
1
vote
0answers
102 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
289 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
526 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
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
4answers
391 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 ...
0
votes
1answer
204 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
3answers
224 views

2 wordpress loops showing 1 post from same post type - how to avoid showing the same post?

I got to two loops in my template files. Both querying the same thing essentially. This loop in my header: $testimonial_head = new WP_Query(array( 'posts_per_page' => 1, 'post_type' ...
0
votes
1answer
382 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' ...
0
votes
2answers
128 views

Get attached media only

I am using wp_query to get uploaded medias. Everything is working fine, but wp_query will return the medias with no post attached. This is not what I wanted. How can I exclude the unattached media ...
0
votes
1answer
52 views

link to a random custom post while excluding current post

I am using the below code to create a link from a custom post to another random custom post. <?php $args=array('post_type'=>'projects', 'orderby'=>'rand', 'posts_per_page'=>'1'); ...
0
votes
2answers
31 views

Exclude recently updated post from custom WP_Query using multiple loops

I want to do something like this but can't manage to figure it out. [Click][1] I am using this custom WP_Query to display upcoming events on my homepage. $events_args = array( ...
0
votes
1answer
75 views

Exclude taxonomy term from all loops, but having it on widget

I have excluded a custom post type taxonomy term from all posts like this: add_action( 'pre_get_posts', 'exclude_category_posts' ); function exclude_category_posts( $the_query ) { $taxquery = ...
0
votes
1answer
1k views

exclude custom post type by meta key in wp_query

I'm trying to display a custom post type (properties) and exclude posts that have a certain meta value (sold). Is there a way that I can do this? I have this for my code so far: ...
0
votes
2answers
920 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
310 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 ...
0
votes
1answer
239 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 ...
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 ...
0
votes
1answer
133 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 ...
0
votes
2answers
501 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
2answers
714 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. ...