The tag has no usage guidance.

learn more… | top users | synonyms

1
vote
0answers
23 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
39 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
17 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
18 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', ...
0
votes
2answers
56 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
30 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 ...
0
votes
0answers
35 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
45 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
145 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 ...
0
votes
1answer
73 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
37 views

Exclude file from theme editor

Is possible to exclude some files from being viewed and modified in the theme editor?
0
votes
0answers
17 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
92 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
23 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
45 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
90 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
66 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
0answers
63 views

hide some nav menu items to non-localhost visitors, based on ip?

For a work extranet website i have a website that's fully accessible on premises. The website is now also fully accessible from outside as well. There are however some level 1 nav items with sub menu ...
0
votes
1answer
185 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
41 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
0answers
57 views

exclude a custom post type with specific term from post navigation

How can I exclude a category term from next / previous post links? $previous = ( is_attachment() ) ? get_post( $post->post_parent ) : get_adjacent_post( false, '', true ); $next = ...
0
votes
1answer
67 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
483 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
382 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
171 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
44 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
46 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
139 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
140 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
412 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
309 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
65 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
326 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
213 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
982 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
115 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
38 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
784 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 ...
0
votes
1answer
392 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
348 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
267 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
195 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
634 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
274 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
33 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
2k 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
30 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')) ? ...
12
votes
2answers
1k 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
200 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 ...