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
- Counting number of posts in a category and its sub categories and displaying result using shortcode
- How to Remove Parents Category Permalink from Posts
- get_the_content if it contains multiple lines it results in SyntaxError
- Print number of post (in reverse)
- Count number of published posts by type
- WP Insert Post function – Insert Post Thumbnail
- How is WordPress manipulating the posts like there are folders?
- Add HTML Attributes To Anchor Tags In `wp_list_categories()` Function
- Creating bulk posts with Youtube videos
- Where do posts get the sidebar from?
- get post based on category chosen in drop down – The ajax method
- Proper syntax or method for keeping url in modified isotope / category links
- Which hook/action will help me solve my problem?
- selected option if current category is the value
- Alert Bar section within WP loop is displaying even though there are no posts
- Get children post mime type using parent post_ID wp_post
- Redirect to another page using contact form 7? [closed]
- How to avoid duplicates when creating recent network posts
- Get all categories post is not in
- Update post title from external file?
- set post limit at load more ajax wordpress
- Array to string conversion on array_map
- How to get category name or ID by post?
- Using featured image of blog archive page
- How to use mysql LIKE with wpdb?
- Do I need to edit my theme in order to change the title of my blog page?
- Listing titles and custom fields of entries within subcategories
- Incrementing PHP variable onclick to display posts by month
- random display categories – change url
- show recent posts php code error?
- Post to WordPress from another Server via PHP
- How to make blog post entries appear as input form instead of just text?
- WordPress Search
- WordPress loop is not working
- Update value of a associative array with update_post_meta
- Adding wp_list_categories to a specific div that was appended using jQuery
- Counting number of posts in multiple (sub)categories using shortcode
- Edit and delete permissions pages and posts
- What is the best way to set the post category (Custom Post Type) automatically based on the one of the tags assigned to the post?
- How do I edit the terms output args or array data?
- Change category thumbnail size
- Post form – AJAX won’t upload featured image – Plugin development
- admin panel – How to remove “delete” button from category editing page
- posts_per_page displays only 2 posts instead of 4 posts
- Get parent category name when only child category is applied to a product
- How to get post titles by post ID and integrate with my code?
- Multiple Tag Filtering
- WordPress recent post
- How does Permalink work with the AMP plugin after Removing Parent Permalink Catalog from Posts
- Polylang and template files
- Need to show 7 posts from actual date
- Notice: Undefined variable
- Can I disable auto increment of WordPress Posts Database to utilize previously deleted records?
- Show subcategory name selected in specific category woocoommerce
- My blog posts section seems to be rendering the other blog posts inside the first? :/
- Exclude category and post from loop in custom category.php
- Exclude a category slug on pagination
- Custom content using in_category
- Get the total Author Favorited posts
- Get posts from category from custom query
- How do I generate formatted permalinks as specified in backend options?
- PHP drop down menu for my get_category child of
- Setting at job with shortcode not working
- Need Quick Help With Product Category Page
- Edit Posts Page but not category specific pages?
- Rearrange get_categories array compared to another array
- Insert wordpress tags below posts via functions.php
- Query seems to be duplicated
- Top menu disapears in Category Pages when filtering using ACF
- Remove the_content From Loop
- Category List in Theme Options Page
- WordPress article with 50 000 words loading slow – 100% cpu
- link to page_for_posts
- Product Category Page in Full Width
- How to create a loop that will display one post and stop?
- $post->ID calls for current page, but what is the code to call for any new page created and published in WordPress?
- WooCommerce: write featured image dimensions to custom fields in product’
- transition_post_status hook, works – but not if the post is new