Page Title: How To Exclude Category From WordPress HomePage? | NapitWPTech

  • This webpage makes use of the TITLE meta tag - this is good for search engine optimization.

Page Description: Here we will learn about how to exclude category from WordPress homepage of your site, if you do not want to display the posts from that category.

  • This webpage makes use of the DESCRIPTION meta tag - this is good for search engine optimization.

Page Keywords:

  • This webpage DOES NOT make use of the KEYWORDS meta tag - whilst search engines nowadays do not put too much emphasis on this meta tag including them in your website does no harm.

Page Text: Bishal Napit Leave a reply If you want to removed the posts from certain category to not be displayed in your WordPress homepage then, you have come to the right place. By default, WordPress will show every posts of each category in blog page. However, here, we will learn about how to exclude category from WordPress homepage of your site. Why you may want to exclude certain category from the blog/home page of your site? In some cases, you may have categorized certain category in your site to display certain portion/details within your site. So, that may not be the blog post listing and hence, it is probably the good idea to exclude that category from the home page. And as we stated earlier, WordPress will not filter out any of the category added in your site by default. It will show every posts created in your site with every category. So now, let’s learn ahead about how to exclude category from WordPress homepage of your site, shall we? How to exclude category from WordPress homepage? WordPress , has given you an excellent filter to do so for within your site. And the filter hook is: pre_get_posts . So, here we will learn on this filter about how to exclude category from WordPress homepage. Hence let’s move ahead and learn about how to do so, shall we? As from the previous link, we can know that: pre_get_posts action gives developers access to the $query object by reference. So, we can assume that using it within the theme’s functions.php file, we can achieve this very goal, which we are seeking for. Hence to exclude category from WordPress homepage, add the below PHP code in your functions.php file of the theme: function theme_slug_exclude_category_home( $query ) { $query->set( 'cat', '-1' ); // Change -1 to the required category id of your site. } } add_filter( 'pre_get_posts', 'theme_slug_exclude_category_home' ); Now, in the above code, you need to set the value of -1 as needed for your site. Here, in our case, it is Uncategorized category. In your case, it may vary. So, find the correct id of that category within your site and then, replace the above code with the correct ones as needed. And if you want to exclude 2 or more than two categories then, you can modify the above code as below: function theme_slug_exclude_category_home( $query ) { $query->set( 'cat', '-1, -10, -20' ); }

  • This webpage has 380 words which is between the recommended minimum of 250 words and the recommended maximum of 2500 words - GOOD WORK.

Header tags:

  • It appears that you are using header tags - this is a GOOD thing!

Your header tags:

How To Exclude Category From WordPress HomePage? Why you may want to exclude certain category from the blog/home page of your site? How to exclude category from WordPress homepage? Conclusion Related Similar Articles Leave a Reply Cancel reply Related Articles  How To Add Cookie Notice In Your Site  Display Header Video In WordPress In Different Pages  Check Configuration Of Installed PHP In Your Server  Query To Display Latest 10 Posts In WordPress  Comments Used In PHP  Make Your WordPress Theme Breadcrumb NavXT Plugin Compatible  Use Masonry To Add Pinterest Style Post Grid In WordPress  Display Different Header Image Per Different Pages  How To Open WordPress Menu Items In New Tab/Window  Disable Comments For Future Posts In WordPress Subscribe  Integrate Bootstrap NavBar 4 Into WordPress Theme  Display Author Bio Without The Use Of Plugin  Display Image Caption Under Featured Images In WordPress  Register Social Navigation Menu In WordPress  Make YouTube And Vimeo Video Responsive In WordPress  Display Different Widgets Per Different Pages  How To Create Shortcode With Attributes In WordPress?  Adding Custom Site Logo Support In WordPress  Setting Up Static Front Page And Blog Page In WordPress  Display Date As Set In WordPress Date Format Setting  How To Exclude Category From WordPress HomePage?  How To Disable Fallback Menu In WordPress?  Create Sticky Floating Navigation Menu In WordPress  Bulk Delete WordPress Posts Via Author, Category And Tag  How To Bulk Delete WordPress Posts And Pages?  How To Exclude Pages In WordPress Search Results Page  How To Add Fallback Featured Image In WordPress Theme  How To Create XML Sitemap For Your Site  Disable Gutenberg Editor And Keep Classic Editor In WordPress 

Spelling errors:

  • This webpage has 2 words which may be misspelt.

Possibly mis-spelt word: WordPress

Suggestion: Word Press
Suggestion: Word-press
Suggestion: Wordless

Possibly mis-spelt word: Bishal

Suggestion: Alisha

Broken links:

  • This webpage has no broken links that we can detect - GOOD WORK.

Broken image links:

  • This webpage has 0 broken image links.

Broken image link URL:

https://napitwptech.com/wp-content/litespeed/avatar/5893bc5f6b204126660734287b16796d.jpg?ver=1650013238
https://napitwptech.com/wp-content/uploads/2016/01/cropped-logo.png
https://napitwptech.com/wp-content/uploads/2018/09/masonry-site-120x90.jpg
https://napitwptech.com/wp-content/uploads/2017/03/header-image-display-120x90.jpg
https://napitwptech.com/wp-content/uploads/2018/04/yoast-seo-120x90.jpg
https://napitwptech.com/wp-content/uploads/2016/12/author-bio-front-end-300x180.jpg
https://napitwptech.com/wp-content/litespeed/avatar/25359a8d6afbfacb8d1778e705eb8979.jpg?ver=1650013239
https://napitwptech.com/wp-content/uploads/2017/06/excerpt-length-filter-300x180.jpg
https://napitwptech.com/wp-content/uploads/2016/04/site-logo-120x90.jpg
https://napitwptech.com/wp-content/uploads/2018/08/menu-items-open-in-new-tab-120x90.jpg
https://napitwptech.com/wp-content/uploads/2018/04/disable-future-posts-comments-120x90.jpg
https://napitwptech.com/wp-content/uploads/2016/02/enqueue-google-font-translation-300x180.jpg
https://napitwptech.com/wp-content/uploads/2018/08/header-video-single-post-page-120x90.jpg
https://napitwptech.com/wp-content/uploads/2017/03/image-captions-120x90.jpg
https://napitwptech.com/wp-content/uploads/2017/09/bootstrap-4-beta-120x90.jpg
https://napitwptech.com/wp-content/uploads/2017/02/latest-posts-120x90.jpg
https://napitwptech.com/wp-content/uploads/2017/03/breadcrumb-navxt-120x90.jpg
https://napitwptech.com/wp-content/litespeed/avatar/ef3ac02cace5bd91f2c666194de791db.jpg?ver=1650013239
https://napitwptech.com/wp-content/uploads/2016/08/responsive-video-120x90.jpg
https://napitwptech.com/wp-content/uploads/2019/02/exclude-category-from-wordpress-homepage-120x90.jpg
https://napitwptech.com/wp-content/uploads/2019/01/after-applying-fallback-featured-image-120x90.jpg
https://napitwptech.com/wp-content/uploads/2019/02/bulk-delete-posts-120x90.jpg
https://napitwptech.com/wp-content/uploads/2019/02/sticky-menu-or-anything-on-scroll-120x90.jpg
https://napitwptech.com/wp-content/litespeed/avatar/8766dda990517beb3b8e6392099fbeb4.jpg?ver=1650013239
https://napitwptech.com/wp-content/uploads/2016/01/phpinfo-120x90.jpg
https://napitwptech.com/wp-content/uploads/2016/01/comments-in-php-120x90.jpg
https://napitwptech.com/wp-content/uploads/2016/12/author-bio-front-end-120x90.jpg
https://napitwptech.com/wp-content/uploads/2016/12/social-menus-120x90.jpg
https://napitwptech.com/wp-content/litespeed/avatar/8766dda990517beb3b8e6392099fbeb4.jpg?ver=1650013239
https://napitwptech.com/wp-content/uploads/2018/03/shortcode-with-attributes-120x90.jpg
https://napitwptech.com/wp-content/uploads/2017/02/widget-per-pages-120x90.jpg
https://napitwptech.com/wp-content/litespeed/avatar/8766dda990517beb3b8e6392099fbeb4.jpg?ver=1650013239
https://napitwptech.com/wp-content/uploads/2019/02/fallback-menu-disable-output-120x90.jpg
https://napitwptech.com/wp-content/uploads/2019/01/exclude-pages-from-search-results-120x90.jpg
https://napitwptech.com/wp-content/uploads/2019/01/cookie-notice-120x90.jpg
https://napitwptech.com/wp-content/litespeed/avatar/55ed26a6766566ea1f34013e49f85073.jpg?ver=1650013238
https://napitwptech.com/wp-content/litespeed/avatar/1cdf068bbeb1b187bf311d5556266bab.jpg?ver=1650013238
https://napitwptech.com/wp-content/uploads/2019/01/classic-editor-120x90.jpg
https://napitwptech.com/wp-content/litespeed/avatar/aa372adc308d67c134dde79c527bd1be.jpg?ver=1650013238
https://napitwptech.com/wp-content/uploads/2019/02/bulk-delete-via-author-120x90.jpg
https://napitwptech.com/wp-content/uploads/2016/02/reading-setting-120x90.jpg
https://napitwptech.com/wp-content/uploads/2017/09/wordpress-date-setting-120x90.jpg
https://napitwptech.com/wp-content/litespeed/avatar/8766dda990517beb3b8e6392099fbeb4.jpg?ver=1650013239
https://napitwptech.com/wp-content/litespeed/avatar/ef3ac02cace5bd91f2c666194de791db.jpg?ver=1650013239
https://napitwptech.com/wp-content/uploads/2019/01/cookie-notice-120x90.jpg

CSS over tables for layout?:

  • It appears that this page uses DIVs for layout this is a GOOD thing!

Last modified date:

  • We were unable to detect what date this page was last modified

Images that are being re-sized:

  • This webpage has no images that are being re-sized by the browser - GOOD WORK.

Images that are being re-sized:

  • This webpage has no images that are missing their width and height - GOOD WORK.

Mobile friendly:

  • >After testing this webpage we were unable to determine if this page is mobile friendly.

Links with no anchor text:

  • This webpage has 1 links that do not contain anchor text - this is NOT a good thing.

W3C Validation:

Print friendly?:

  • It appears that the webpage does NOT use CSS stylesheets to provide print functionality - this is a BAD thing.

GZIP Compression enabled?:

  • It appears that the serrver does NOT have GZIP Compression enabled - this is a NOT a good thing!