The tag has no usage guidance.

learn more… | top users | synonyms

0
votes
0answers
23 views

When will they make it possible to exclude post types from an wp_query?

Very simple, when I am setting up the arguments for an wp query, I can't exclude post types. While it is possible to include them, I would love to see an excluding possibility. Is there any ...
0
votes
1answer
39 views

Exclude current post from an array of posts?

I'm trying to exclude the current post from an array and I know that the codex says that it's not possible to combine post__in and post__not_in in the same query... But in wordpress everything (well, ...
0
votes
2answers
33 views

How to exclude a specific tag from the list of tags for the current post?

I would like show a list of tags assigned to the current post, but exclude one by tag id. I tried excluding it from the array of objects returned from wp_get_post_tags, something like this: $tags = ...
4
votes
2answers
149 views

Exclude certain category from latest updates

I am creating a website. There is a column for latest updates. This is the code that i have now. I don't really good in php coding. Would like to get guidance from someone. <?php $postslist = ...
0
votes
1answer
48 views

How to get post with slug and exclude categories

I want to do a query to get posts with a slug and category__not_in. Here's what I do: $query = array( "name" => "test", "category__not_in" => array( 15 ) ); query_posts( $query ); ...
0
votes
1answer
42 views

Exclude latest post from WP_Query taxonomy term loop

Any help would be greatly appreciated! I have a Custom Post Type 'video', with a taxonomy 'tax-video' and I'm looping through posts in the sub-taxonomy term 't-o-t-w'. I need to exclude the latest/...
0
votes
0answers
26 views

Exclude Featured Image Attachments from Wordpress Search Results

I'd like my search.php page to show all attachments except featured images (because they appear as duplicates of the posts that use them). I have seen some examples that do this for a query, but can'...
1
vote
0answers
15 views

Reload parent categories list in (new) post [closed]

I have a question about parent categories list in a (new) post. I have few categories what I would like to exclude from parent categories list. When I open (new) post page, few categories are ...
0
votes
1answer
12 views

Exclude category from DB query

I have next code: $drivers_all = $wpdb->get_results("SELECT DISTINCT meta_value FROM wp_postmeta WHERE meta_key = 'driver'") With this one I get the values of all fields “driver”. How can I ...
0
votes
1answer
35 views

Exclude posts with certain meta data from search results

I'm trying to exclude al posts with certain meta data from the search results but so far it's not working. Here's the code I'm using: function ZoekGeenLegeItems( $query ) { if( is_admin() || !$...
-1
votes
2answers
88 views

Call function on a single page

How can I apply this function to a single page ID: function exclude_jobs_locations($args){ $exclude = "40"; $args["exclude"] = $exclude; return $args; } add_filter("...
0
votes
1answer
58 views

$query->set( 'post_type', 'post' ); not working

I am trying to exclude pages from my search result with this function: function posts_for_current_author($query) { global $user_level; if($query->is_admin && $user_level < 5) { ...
-3
votes
1answer
46 views

hide particular category post from front page only [closed]

i have setup a new wordpress blog and have few categories one is called news and it updates too frequently and less important so I want news category posts to be excluded from my home page only and if ...
1
vote
0answers
42 views

Exclude Category filter from Portfolio section

I am stuck with this since hours and found lots of forum entries about NOT IN, WP_Query, category__not_in portfolio, editing JS/ CSS in Theme options or having bits of code to add to portfolio.php, ...
0
votes
1answer
68 views

wp_list_categories not excluing multiple ids

I recently updated to WP 4.4 and im using this code: $args = array( 'orderby' => 'ID', 'show_count' => 1, 'taxonomy' => 'portfolio-type', '...
0
votes
1answer
20 views

Exclude Everywhere but Admin Area?

Currently I have this: if ( ($query->is_home() && $query->is_main_query()) || $query->is_archive() || $query->is_search() ) { ... } I tried !$query->is_admin() but this didnt ...
-1
votes
1answer
34 views

Show all tags but exclude a certain tag

I'm trying to get it work with tag__not_in but it doesn't work. $args = array('order' => 'DESC', 'orderby' => 'count', 'number' => '70', 'taxonomy' => 'post_tag', 'tag__not_in'=>array(...
0
votes
3answers
145 views

Exclude a specific tag from the get_the_tags list

I am building a child theme for my personal use. Not very familiar with php, can only do basic things based on logic. I need to exclude one tag from being displayed on the tag list on a single post. ...
0
votes
0answers
61 views

Exclude a WordPress folder from the rewriting rules?

My teammate and me would like to work together on the same project. I am the frontend integrator and my friend is the backend developer. We would like to work in this way (if possible) : 1) I create ...
1
vote
0answers
68 views

'exclude' argument is not working with get_posts for a custom post type

I'm trying to use get_posts to get a random list of customPostTypes but I want to exclude some id's. I already try the query with the following options: Current) 'exclude' => array(622, 621) --- ...
0
votes
1answer
65 views

Exclude from wp_list_pages by template

I have a series of "Thank You" pages which result from different form submissions. I would like to be able to exclude these from sitemaps based on their template. Specifically, and as an easy example, ...
0
votes
3answers
340 views

Skipping first 3 posts in wp query

Here's the query i have used. <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $wp_query = new WP_Query('order=asc&orderby=meta_value&meta_key=date&...
0
votes
1answer
115 views

Avoid repeated post on page 2 when excluding one on page 1

On the site we're developing, infinite scrolling is activated by Ajax/JavaScript. $('#inifiniteLoader').show('fast'); $.ajax({ url: "<?php bloginfo('wpurl') ?>/wp-admin/admin-ajax.php", ...
2
votes
1answer
42 views

Exclude file from theme editor

Is possible to exclude some files from being viewed and modified in the theme editor?
0
votes
0answers
24 views

Hide event from specific category when adding events to main RSS feed

I used the following snippets to add events from The Events Calendar to my main RSS feed so that visitors can subscribe to post for the site via Jetpack: // Add Events to RSS Feed function ...
0
votes
1answer
155 views

How exclude 3 latest posts of a category in query_posts

I am newbie in wordpress development, and usually I use query posts with simple commands. I have a slider in home page which shows 3 latest posts form 'featured' category. I have also a news box ...
0
votes
0answers
24 views

remove file plugin include

i use a plugin that include template.php file , i want to replace this with a new one in my template directory or remove it class jqueryTimelinrLoad { public function shortcode($atts, $...
0
votes
1answer
77 views

Text with special class as excerpt (or exclude special class)

I am new in Wordpress and I am trying to customize my own theme. All my posts are starting with a kind of content that I don't want to become the excerpt. It is kind of header. Is there a way to ...
0
votes
2answers
164 views

how can I use WP_Query to exclude a specific tag.?

I have the following working code for a query on a specific category and tag slug: $args = array( 'category_name' => $cat_name, 'tag' => $tag_name, 'post__not_in' => $sticky ); $my_query =...
0
votes
1answer
76 views

Exclude Custom Post Type & Pages From Auto-Tag Function

I am happily using this bit of code to auto-tag posts by author (thank you again cybmeta): add_action( 'save_post', 'add_authors_name'); function add_authors_name( $post_id ) { $post = get_post( $...
0
votes
1answer
218 views

Filter keywords from search query

I have search over the google, somewhere out there and here(http://wordpress.stackexchange.com). But, i can't seem to get the solution i was looking for. I would like to ask that, is there any ...
0
votes
2answers
44 views

Exclude post category in a blog page

I have two links in "news" where all the news posts goes "blog" where the rest goes just wanted to exclude the category "news" in the blog page I use the code $news = new WP_query ('...
0
votes
1answer
77 views

Exclude Tags by Array

and thanks for any help!. I'm trying to display all of the tags except ones that start with a token ("Author: "). I have figured out how to exclude a single tag (just typed it into the exclude ...
-1
votes
2answers
564 views

Cannot exclude particular post from loop of custom post type

I have a custom post type (from a theme installed by previous developer), and here is the code of loop which retrieve the post and display them. <?php // Counter $post_count = 1; // Query $...
2
votes
1answer
572 views

Excluding a category from next and previous post links

I am trying to figure out the code to exclude a category from my next and previous post links. My code for the next and previous is as follows: <div class="next_prev_cont"> ...
0
votes
1answer
229 views

Use posts_where to exclude posts ids from wp_query

I want to use posts_where to exclude an array of posts ids from all queries in my site. The array containing the posts ids depends on the user that is logged in. Can someone please tell me how to ...
0
votes
1answer
46 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
48 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
164 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
156 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
477 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
vote
2answers
359 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' ); ...
2
votes
1answer
69 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 H.M....
0
votes
1answer
409 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
231 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
1k 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
126 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
43 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
1k 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
2k 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 ...