WordPress Posts are not stored in a single table. Postmeta is stored elsewhere, and of course each table has its own format. If you ever publish content directly in WordPress (posts, pages, attachments, etc.) you could quickly run into issues with post IDs. Even if not, it would potentially require some fairly significant data manipulation to convert your non-WP data to WP-useable structure.
In this case, I’d say a REST API would be a much better way to go, and it would also be more forward-compatible.
Related Posts:
- Adding custom tables to WordPress
- Create Pages from Database
- How do I write this SQL statement for Posts written in last 24 hours?
- wpdb custom post_type problem
- Assign External Database Queries to Global Variables and Make Them Accessible
- Function causing the loop display posting more (empty)
- I’m trying to create a custom version of the wp_list_authors function that includes custom post types
- when looping through custom post data not appearing
- Custom post type and custom taxonomy key lenght & query performance
- Populate custom post type/custom fields from an external database
- Understanding Post Formats/Custom Post types Etc
- Custom post type causes php-error in php version 5.2.17
- Trying to get custom post of a custom taxonomy
- How can I group posts by months and years?
- Specifying meta field’s column type in Database using add_post_meta
- PHP question: how to combine syntax?
- Trying to Create a PHP Variable for post_type that can be referenced Site Wide
- Add first letter of titles to array, then compare arrays
- Replace dynamically content in a custom database table when a custom post is created
- Loop increase number
- custom post for slider
- WordPress Block developer from exporting Database via PHP
- Using wp_query to modify the loop in index.php for a CPT
- WP_Query Custom Post Type if Category ID Equals
- Running a song lyrics site on WordPress
- Save and user submitted data from a form and display them in the wp backend
- Assign category a default post type
- Front end access to a SQL data repository – recommended way?
- Navigate posts with different post type that are in the same categories
- Dump custom post type database
- Not sure why this template for custom post type posts isn’t displaying anything. What’s missing?
- Should I use custom taxonomies or not?
- Is This Code Efficient – Or is there a better way?
- wpdb prepare insert table doesn’t work
- Should I use WordPress to skin a database website?
- How do I display offsite database info on my wordpress site?
- Control content before and after custom post type loop
- Custom Post not working as expected
- How to use a variable as a function name?
- Creating Database Table vs. Adding MetaData to Post & User
- Designing a custom post type with a minimum number of meta fields
- Check IF single OR multiple custom data has been entered
- Get custom post type categories to show up in menus
- Saving fields in a drop-down in WordPress
- Allow front end users to add data to a custom post type
- Displaying custom post types as a gallery
- WordPress and MySQL: trying to print data using PHP from user_meta custom field data
- Assigning a category to a custom post type in WordPress
- Show current custom taxonomy
- finding and using post type fields in WordPress
- I need to add a filter to prepend the term ‘National – ‘ to the post title if the post is tagged to multiple states
- Is there a way to create two template for single custom post type page?
- How exclude or skip post type with get_next_post_link
- WordPress: Custom User Role cannot access Custom Post Type | “Sorry, you are not allowed to access this page”
- Most commented posts by time period (last 12h, last 24h and etc)
- How do I add custom HTML to the content of an archive page’s posts?
- Update post if exist from PHP
- Different options per post type in WP_Query
- After creating Custom post type by user delete old one
- widget_posts_args not using the number of posts in widget
- Show message when query has no posts
- Create short URL with auto 301 redirect
- How To Post WordPress Custom Post Types to Twitter via IFTTT
- Pagination hitting 404 page on /page/4
- Get data from PHP to JavaScript to set position of each post on front page
- Undefined $post in wp_query
- Get posts from Custom Taxonomy
- WordPress hook which triggers on post import
- I can’t update my data through $wpdb
- How do I create a new post upon registration with the users first and last name as title
- Removing full title and breadcrumb header container for a specific post type
- Is it possible to use array_walk() to append terms to an array of posts?
- Update all published posts at once
- Query entries from custom post type in an ACF flexible content field
- get_post_types() can’t get some of my post type
- Creating a non-hierarchical Taxonomy that behaves like categories
- Creating shortcode id for custom post types
- When I choose category from dropdown then everything working fine.But in backend it checked only child not parent [closed]
- Shortcode is displaying the content on top of the page [duplicate]
- get_terms() returns Trying to get property of non-object error for custom taxonomy
- Filter content in shortcode
- Query custom post types & Taxonomies and list them in a table on a page
- Custom post type and custom taxonomy 404 on page 2
- Creating a “glossary” of WordPress posts of a specific post type
- Show current user posts in custom post type query
- Using Pagination for Custom Post Type and keeps returning 404
- Custom Ratings for Theme, Proper way to Refactor Code and Clean up Template File
- Importing JSON feed giving Notice: Array to string conversion error
- How to add new post using a form to categories when categories are using as menu
- How to set the mainpage of a custom post type?
- Different post title, keywords and description
- Entity to store contact form entries?
- post_content is stripping HTML when adding a new post? [closed]
- custom post type by author – wp job manager
- Querying a custom post type, but not show duplicates
- Nested Custom Taxonomies | Incorrect posts when querying
- List latest post out of 2 custom post types
- Validate Custom Post Type fields
- meta query not retrieving posts
- Using Wp_Query, Json to add Highcharts series data