try category__not_in
$query = new WP_Query( array(
'numberposts' => 6,
'offset' => 0,
"category__not_in" => 148,
) );
you will see more options here : https://codex.wordpress.org/Class_Reference/WP_Query#Category_Parameters
Related Posts:
- Hook for post and page load
- Custom Posts on Different Pages
- Wp-query causing problems with the_content();
- How to create posts (not post template) to be displayed on projects page?
- Display “Post 2 of 4” on single post page?
- Quickest way to get last or oldest post date – WP Query
- How do I create an archive page for standard posts?
- Making pages also serve as taxonomies? Or give full pages to taxonomies?
- Why does using WP_Query inside a shortcode in an elementor page cause the arguments for WP_Query to get malformed?
- Loop on front-page.php
- WP_Query is printing out only one post when posts_per_page is set to multiple
- Trying to edit the single page from a Custom Post
- WordPress Orderby Numeric Value Not Working
- is there a way to retrieve posts that do not have a featured image assigned?
- How to add post_type=value when editing that post type in the WordPress admin?
- How i can add ‘N’ page of ‘N’ pages under posts loop?
- Storing posts from query and accessing later via AJAX call
- Show custom post type filtered by category
- Get latest 3 posts from multiple CPT in one query
- Allow non-logged in users to see a future post after clicking on a list of future posts
- Several post types on WP Query by tag and taxonomy
- No Permission to add new Page, Post or CPT with Admin role
- Prioritize posts in query by meta keys?
- How to get all tags of a custom post type by id
- WP the_posts() on single-cars.php get category link
- Different Limit number of post on different archive page
- Including link to custom post type in ‘wp_list_pages’ function
- Multiple pages per post (not pagination)
- Custom post types and ‘new WP_Query’
- Can I change my post type to anything and my site still work?
- Variable not working in WP_Query
- Display an authors post on a single page only when they are logged in
- WP_Query with custom post type ID
- Query within a foreach within a query (queryception)
- wordpress lists similar type of posts in a custom post type
- display posts of custom post type with custom taxonomy
- How to set the mainpage of a custom post type?
- How to Query in WordPress which shows Alphabetic Posts?
- Render a Post or Page using the correct file
- How to query Posts from a custom post type which contains a custom taxonomy?
- Display post from custom post type
- list posts of two post types in a single template
- How to fetch posts that are stored in the different table than (default) wp_posts?
- wp_dropdown_pages with tax_query clause
- Am I mixing up the concept of posts pages and categories?
- How to setup different permlalinks for posts and pages?
- Does “Custom Post Type” can have page hierarhy option?
- Display Parent-Child Posts in specific order by comparing IDs in array
- how to display posts content on the custom css popup by clicking on each title on the sidebar?
- wp_post_delete is deleting all offices
- SEARCH QUERIES – REVERSE OUTPUT
- How do I insert a custom post type query after a certain number of recent posts and then resume recent posts?
- Cannot save pages after migration
- minimize wp_query call to database
- subtracting the current post form then whole loop, which is generating all CPT titles
- post type => ‘any’ not applied my custom queries
- Custom Post By Category
- Custom post Query and WordPress Post Query Clash
- How to get the posts that my following users are liked?
- Get post from Category by Priority
- Most efficient way of showing children posts?
- Only show current category post
- WordPress Contents Migration
- One Post with different content, depending on a Page
- How To Loop Through list with Custom Post Types
- Cannot use pages created on WP
- Different post types arranged on one page
- Calling specific page with wp query
- How to display data with pagaination on backend?
- How to Associate Posts with Pages
- Retrieving IDs of child pages which are in a different post type
- Query Posts From Multiple Post Types
- Why are my wp urls showing page not found?
- Change display wp post type to wp custom post type
- Dynamically change post_parent in every page load?
- How to store queried custom data and use it in multiple pages?
- Cannot exclude particular post from loop of custom post type
- Wp-theme Development
- show the most recent date of all posts to display on front end
- Sort ACF by custom taxonomy
- How to query for posts (in hierarchical custom post type) that have children?
- Should unaltered default loop/query return a list of custom posts belonging to a custom taxonomy?
- Display Custom Post Type in Recent Posts
- Query for posts in 2 taxonomies
- Parent / Child formatting in a list of post of a custom post type
- Combining sorted and random CPT
- Custom taxonomies relationship
- Different Ways to Query Custom Post Types?
- find custom post type post by searching its custom field with my string
- Limiting the Number of User Posts to Their Own Posts
- Output all terms slugs for a loop filter
- Post Query , breaks layout if a post is deleted
- Not able to get my custom search result using meta_query and tax_query together?
- Multiple WordPress Sites, Same Database but Filtered Content
- WP_Query function for custom post type
- WordPress Author Posts Review After Every Change In The Same WordPress Post
- Custom Post Type meta oembed html output resulting in WSoD
- shortcode for recent custom type post
- Can WordPress show posts based on a button that the user clicked 2 pages back?
- is therer any wordpress function to retrieve a specific html element from post content