Add a WHERE clause to your query for post_type="post".
Related Posts:
- MySQL Query to Retrieve Category from wp_posts
- SQL Query for getting all posts in their latest revised state
- Search & Remove Specific Shortcode From All Posts
- Manually delete post from database
- How to force update all posts after import
- Query All users that has post
- Can’t publish new posts
- Manually removing revision post types
- Reset/Reorder posts ID in the MySQL wp_posts table
- How do I find which articles are missing a featured image in The WordPress database?
- Tags to Post-ID mysql query. Tag Search
- wp_insert_post – duration
- Get user categories with most posts in it
- MySql query to get posts with all meta and terms
- Custom order for Mysql array
- List authors with the last post title and order by last post date
- How to Mysql select a list of posts with meta_values AND all relevant categories?
- Remove a shortcode from all WordPress posts
- Order posts alphabetically: how to set order=asc in mysql query?
- What do these phpMyAdmin errors mean on my WordPress databaes?
- What happens if I delete all the rows that represents a post revision from the posts table into WordPress database?
- Delete post results in “Cannot delete or update a parent row: a foreign key constraint fails”
- Inner join overrides Advanced Custom Fields plugin’s get_field [closed]
- update image path with words starting uppercase to lowercase chars
- Queries take 120+ seconds on my large WordPress site
- Database hacked – random posts are modified
- Need to change all links in page content but not in post content
- Can’t update WordPress Page if post_content is Empty
- Restore woocommerce orders
- How to select particular month post from table and update the post status using MySQL?
- How do post IDs work in WordPress?
- Get author posts count after excluding a category
- get last post’s link with SQL query
- query for filtering published posts?
- MySQL: Possible to replace all of wp_posts.post_content(id#) via UPDATE + REPLACE + SELECT?
- Deleting post tags removes categories
- Return records between two meta datetimes saved as strings
- WP query taxonomy optimization
- MYSQL: Create SQL query to search for string and replace
- Query to fetch custom taxonomy along with post title
- Mysql update menu_order problem
- Bulk find & replace on WordPress posts/pages (minus image paths)
- WordPress MySQL Search and replace with wildcard?
- Add postmeta to all blog posts
- ‘posts’ table should not store the absolute image path
- Dev and prod on the same database- dev version active for IOS
- load post data into mysql
- SQL trigger failes with post_content
- Converting Posts to Pages
- How to change the publishing date of each posts?
- SQL query to remove first image in all posts
- Delete junk text from all the post using my sql command
- How to create a post based on data in a table?
- If meta_key exists then don’t select this post?
- How to update wp_posts with just the returned comment count from wp_comments (SQL GROUP BY)
- How to manually delete post from database without causing conflicts?
- How to list recent posts in a wp nav menu?
- Restrict edit, but allow preview for custom post status
- How to display posts via custom taxonomy terms using checkboxes?
- Get current post data into array?
- do more action after I publish a post
- Retrieve only posts from a specific user in wp-admin/edit.php
- Adding an Archive button to posts page for administrators
- Is there a way to create a meta box that can be added multiple times to a post dynamically?
- What’s the safest way to switch and restore a post global?
- How to add automatically bootstrap 4 order-lg-1 and order-lg-2 classes for columns in foreach loop based on the count?
- Creating a WordPress Post via REST API – HTML or Markdown?
- Add code to a specific post’s content
- Add two custom fields as a default to the “new post” page.
- When WP_Query only returns 1 post, how do I automatically redirect to that post?
- Optimize CPT-function with a loop
- Post-Archive like a page in a specific subdirectory
- If post exists, make it a comment in existing post with same name?
- How to display only one category in a custom post type?
- Get only X number of categories
- I need to create “View Profile” and “Edit Profile” links by incorporating the Post Title/ID, but can’t seem to manage it
- Turn off display for custom sidebar post widget when on the post it’s displaying
- Post picker custom field on page
- Posts missing in Dashboard, but are still on blog pages
- How to order posts in WordPress by date?
- My post permalinks are redirecting to the post archive page for some reason?
- Limit Post Creation Count by Author or Role
- I’d want to exclude current post from related post
- Hide or remove custom post status
- Add id attribute to h1 element of wordpress post
- Creating interactive drop down lists in a post [closed]
- Problem with wp_insert_post()
- Front end post delete error confirmation and success message
- Changing a field value on submit using a PHP variable
- Randomize access to post
- Shortcode for printing post titles
- TwentyThirteen theme Posts page shows posts instead of page content
- wp_query select if have comments
- Help post permalink
- Redirecting posts in WordPress to a specific page
- Numbers of new post since the last visit of user
- Post data returning null [closed]
- Dynamic Menu Item
- Adding contents to my wordpress site
- Server 500 error when updating post using block editor