You can exclude categories from your posts page using pre_get_posts
function exclude_category( $query ) {
if ( $query->is_home() && $query->is_main_query() && !is_admin()) {
$query->set( 'cat', '-1347' );
}
}
add_action( 'pre_get_posts', 'exclude_category' );
Might be better to use the category slug or I.D. Same with the tag.
There’s also 5 parameters you might want to look at for previous_post_link
and next_post_link
Related Posts:
- Inject post (from specific category) between posts in Loop
- How to display related posts from parent category
- Use template for posts with a particular category grandparent
- how do I get a specific post from a post with a subcategory in WP
- Different post styles depending on category
- Loading index.php contents which located outside blog folder for post single page
- How to show only subcategories in parent category not parent category?
- Get latest post from all categories except one
- Add new post in existing categories using wp_insert_post
- Displaying list of posts in category page
- Do not duplicate posts with multiple categories in multiple loops
- Loading Posts & Category with Ajax
- Wrap posts p tags in div
- Pagination at category doesnt work with same name of page
- How to show categories and date on posts
- Trying to show the category of a post in the post display
- How to use a PHP file to control the content of a blog post
- LinkedIn Share Post Button
- Displaying 3 Category Posts differently
- Unable to get Post Category Name and URL
- Trying to see if page is category or single and displaying title with appropriate heading tag
- Display post of specific category on page
- Display posts based on the selected category when no subcategory is chosen
- Automatically add custom CSS to new posts using a category template
- How Display Posts on category
- Hide wordpress field if data is empty in post!
- Customize Time Stamp
- How can I use wp_query to show all product data using just the products ID?
- hover image appears below placeholder instead of overlayed
- combine Code 1 with Code 2
- Query all posts of a custom taxonomy term
- get current product name in functions.php
- Retrieving Author ID in wp-admin area
- get post based on category chosen in drop down – The ajax method
- How to use transient in this code for related post?
- Getting a specific post values to another div or modal
- Trying to add attribute to my posts’ featured image
- Creating a related post section based on similar categories
- How do I ensure that a piece of hard code only gets called, when on my appointed Blog page?
- Swapping wp_dropdown_categories function with wp_category_checklist
- Displaying the last post on static homepage
- Can’t get wp_insert_post to work
- Why not yield/iterable in posts interface?
- Best practice for migration friendly images in posts/pages?
- Where in PHP do I move title and meta (date) to bottom of each blog section?
- Proper syntax or method for keeping url in modified isotope / category links
- Display post category in foreach loop with category link
- How to show part of the_content?
- Filter Select results based on selection
- How to make number of blog posts a custom field?
- What is an equivalent of single_cat_title for getting the slug of the category?
- Unreadable pagination
- 200 Rewrite blog post links
- Issue adding sub category programmatically
- How to set a min number of words for a blog post
- Loop through categories and display posts title under each dropdown
- Get post id in a function when edit/add a post
- How to exclude category ID from Looper in WordPress
- Add a specific part of current category page url to shortcode
- Automatically create child pages and grandchild pages when saving a (parent) page
- WP grandchild categories in nested ul li
- Grab posts by multiple categories
- Pass Category Name, Description and Photo into variables to pass to jQuery
- How to show single category archive
- wp_trim_words() does not work with my code Am I doing any mistake in my code?
- Move category description below post list in blog
- How to pick the default selected value in wordpress dropdown?
- Second transition_post_status hook fired instead of the first
- Applying A Category to Existing Posts Where Page Title Matches Regex
- Get page that displays all children of taxonomy parent
- How to store post ID’s in cookie or session to display the same posts later
- Which hook/action will help me solve my problem?
- How can I add extra word in permalink when someone click download button?
- selected option if current category is the value
- Blog posts repeat
- Post + form + action + results on the same page
- Open post-content in archive page in a Modal box with bootstrap
- get_template_part based upon post’s category
- how to save selected option in variable for rest api category filter
- Setting default category base on theme activation
- Recent Posts Not Showing Only On A Specific Category Page [closed]
- Hide subcategories (widget)
- Alert Bar section within WP loop is displaying even though there are no posts
- Let Users Choose Post Categories
- remove post that has no content
- Display category name only once inside loop
- get post content of particular post by url
- Post repeating with infinite scroll
- Custom posts in different columns style
- Get children post mime type using parent post_ID wp_post
- 404 error when I acess the second page of post-type
- how to show only specific category for a template
- Redirect to another page using contact form 7? [closed]
- Display post category in foreach loop
- Single.php – Get Current Parent Category
- Dilemma of Populating all the categories in a drop down list
- Which PHP page is the Default Posts Page
- Display most popular posts of category
- retrieve post data and insert it in seperate static html page without WordPress
- Creating sub-categories via php