The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
0answers
15 views

Function to bypass specific words in search?

Is it possible for a word to be skipped/excluded/ignored in the default search? For example if I type the great thing in the url instead of '?s=the+great+thing' it will only display ?s=great+thing ...
0
votes
1answer
36 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
34 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 ...
0
votes
1answer
33 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
59 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
68 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
votes
2answers
63 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
28 views

Include Category With Tax Query

I'm using The Events Calendar plugin but I thought I'd post it here as I believe this particular function works the same as get_posts(). I'm trying to use the function to display only posts from one ...
0
votes
0answers
29 views

Exclude one specific slug from rewrite rule

I use the following rewrite rules to show a specific post of a custom post type in a category and all posts of a custom post type within a category: add_filter('rewrite_rules_array', ...
2
votes
1answer
33 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 ...
0
votes
1answer
52 views

Have posts that belong to multiple categories, exclude some categories from homepage

So I have categories A, B, C and D. And also categories 1, 2, 3 and 4. I have posts that can belong to any four of these categories. But I want to exclude anything in categories B, 4 and D from the ...
0
votes
1answer
84 views

Exclude all subcategories in the_category (post)

I'm looking for a way to hide all the subcategories based in my post: It always displays in my posts like : Categorie, sub categories. So I'd like to exclude all of the sub_categories. I've been ...
1
vote
2answers
197 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 ...
0
votes
2answers
43 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
22 views

widget exclude post by custom field

I have a widget that gets posts from different post_type's. I want to exclude some posts that have a custom field value e.g. I save a form where a checkbox adds a value of 0 or 1 depending if ticked. ...
0
votes
1answer
102 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 ...
4
votes
1answer
889 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 ...
0
votes
1answer
111 views

Weird string offset errors when displaying post attachments

I'm trying to create a gallery page that takes image attachments from a certain category and displays them. It works but I have a problem it seems where I'm trying to exclude certain attachment types ...
0
votes
1answer
94 views

Exclude category from get_the_category

I want to exclude a specific category from the loop, here's what I tried: Original code: // auto posts by cat if( $bawmrp_options['auto_posts'] == 'cat' || $bawmrp_options['auto_posts'] == ...
3
votes
1answer
145 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 ...
0
votes
1answer
119 views

I need to exclude from a query a category and a few custom taxonomies

I need to exclude from a query a category and a few custom taxonomies. Is this code right? This query don't exclude any post, the one with the category, or the custom taxonomy. What am I doing wrong? ...
0
votes
2answers
249 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
106 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
1answer
23 views

Don't execute function on specific posts

function content_strip_img($content) { global $post; if ($post->ID !== 1 || $post->ID !== 2 || $post->ID !== 3 ) { return preg_replace('/<img[^>]+./','', $content); } } ...
0
votes
4answers
623 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
24 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')) ? ...
11
votes
2answers
515 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 ...
1
vote
1answer
164 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
1answer
99 views

How to display elements of different post types?

What happens is: I have a custom post type called "placas" and have an associated custom taxonomy called "firmas" and this taxonomy is the terms "LG", "AOC", "Panavox". I want to show a certain ...
0
votes
1answer
49 views

specific post is not excluded from the loop

I have registered a CPT and created archive-myCPT.php, here I want to exclude a specific post from the main loop. This is my code: <?php $query = new WP_Query( array( 'post_type' => ...
1
vote
0answers
446 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 ...
0
votes
1answer
90 views

remove term from custom taxonomy list

I have the terms of a custom taxonomy presented in a list like this: <?php $taxonomy = 'categories'; $tax_terms = get_terms($taxonomy); ?> <ul> <?php foreach ...
0
votes
1answer
67 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
0answers
40 views

How to exclude a taxonomy term using url alone

This may have been answered somewhere but I may not be searching for the right wording or my concept is just way off :-) In a nutshell: If I have a url like this: ...
0
votes
2answers
42 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
0answers
143 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 ...
1
vote
2answers
70 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 ...
0
votes
1answer
47 views

How to query posts to include specific pages of one post type, and all pages of another post type?

I'm having trouble figuring out how to query all posts from the post type "events", as well as including four specific pages in the loop. If I use the "include" parameter, it only returns the ...
0
votes
1answer
397 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
237 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
91 views

Terms from current post custom taxonomy — excluding parent and only from a single parent term

The title sounds complex but this is quite simple. Hopefully the code for it is too. I have this custom taxonomy we'll call "Filters". ParentTerm A ChildTerm 1A ChildTerm 2A Parent Term B Child ...
0
votes
1answer
86 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: ...
1
vote
1answer
457 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
votes
1answer
93 views

exclude page element from specific pages

I'm using a specific navigation menu that should be present on all but two pages. How can I exclude <div class="portfolio-nav"> from the specified pages(About & Contact)? <?php ...
0
votes
1answer
187 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
3answers
243 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
275 views

Exclude posts with specific meta_value while sorting by a separate meta_value

I am trying to exclude posts with a specific meta_value with a specific meta_key while also sorting the posts by a meta_value with a different meta_key. This is my current code for the WP_Query ...
0
votes
1answer
318 views

How to exclude Sticky from Recent Post?

Im sorry about my english. I using below code to display recent post in my footer. The problem is, my recent post show sticky post. How to hide or remove sticky post from recent post?? <div ...
0
votes
1answer
243 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 ...