Skip to content

Devi Sri Mari Blog:: Web Technology Trends, News, and Social Media

Menu
  • About Me
  • CONTACT US
  • Sample Page
  • WEB DEVELOPMENT
Menu

How To Hide a WordPress Category Posts?

Posted on January 27, 2014

wordpress

To display certain posts on your WordPress website you may need to hide specific categories from posts pages.

To hide the specifics category, you need to add the following lines above the Loop

<?php if (is_front_page() && !is_paged()

) $posts = query_posts($query_string . ‘&cat=-35,-68’); ?>

This prevents posts from categories 35 and 68 are not appearing in the list of posts.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • “Who needs Superheros when there is a Real hero and she is called as Mother”
  • Improve Your Business Behind Social Media
  • Single-Page Application Benefits and How it Works
  • World Sparrow Day
  • Google’s ‘Mobilegeddon’ Will Affect Search Results
  • How To Use Google’s New Blocked Resources Report
  • Wikipedia Lists Ten Most Edited Pages Of 2014
  • Google Is Shutting Down The Google Earth API
  • Google Maps App Adds Real-Time Weather & Facts
  • Google Maps App Gets Design Revamp
©2023 Devi Sri Mari Blog:: Web Technology Trends, News, and Social Media | Design: Newspaperly WordPress Theme