Unless you want to use PHP to run queries directly on your database, you’ll have to use a REST API and Javascript to gather the data. One point worth noting is these REST API’s also use direct database queries in order to gather info to return to you when you make a request. This means that any updates to WordPress database structure that would break your app if you wrote PHP to access the DB would also break the API plugin you use. The only difference is most plugin devs are pretty quick as far as updates go when their code becomes deprecated, and may be able to fix any issues faster than you could.
Here’s one JSON API plugin I found in the WordPress repo: http://wordpress.org/plugins/json-api/
I’m sure there are others. Just look around. Let me know if this helps clarify things a bit.
Related Posts:
- How to properly insert data into custom table via plugin
- How to build an API as a plugin
- Simple form that saves to database
- How to store ACF custom fields data in a custom table
- How to edit/delete single row items in a table on my own menu page
- Create or Update thousands of woocommerce products via PHP
- Get total number of comment of the posts written by an author
- How to write one comment and publish on every post using database or plugin?
- Make id column as AUTO INCREMENT on plugin activation
- wp_remote_get() returns 403 while file_get_contents() does not
- Creating a CSV with PHP inside the plugin directory
- How to pass the API key to the client from the database? [closed]
- Issue running db create table query from static method
- Integrating boxtal PHP library into a custom WordPress Plugin
- How to create plugin/ page that reads from database
- Api external with wordpress
- Comment “like” problem – “users who like this” avatar linking to current user profile instead of “liker’s” profile
- Is this plugin safe to run?
- How to display results from a data table with an encrypted user id?
- add_action for publish_post doesn’t work
- Getting URL GET parameter with Code snippets and storing it in database?
- How to convert Currency from USD to other IP Based currency in Php function
- How do I display PHP file contents on front end of WordPress?
- Push Contact form 7 variable to front end after submission
- Cant create table on plugin activation
- How to use WordPress header function and footer function and not load word press database
- Get Shortcode output to database for static post_content
- Moving a few select DB tables to a new WP instance
- How can I store user preferences in WordPress and retreive them later?
- How to save information related to post in database?
- cURL External API request displays content above other content on page
- plugin doesn’t retrieve data from database
- Error 400 Invalid “products[1].productId” Kinguin [closed]
- Can I send a body using wp_remote_get()?
- can not serialize and insert data from custom form
- How can you call to data in google sheet based on ID number?
- Add a plugin before main container
- Shortcode to generate and save password in a file
- How to get subscription key or id using Woocommerce Subscriptions [closed]
- How to get member list based on role by using buddypress?
- I don’t understand how this parameter works..?
- Why wp_mail() function isn’t sending any emails and displaying ‘0’ in Chrome ‘Network’ response
- How to initialize something in unit test before the init hook being called?
- Is the wordpress user-model changed in wpmu?
- Default Plugin Settings Not Writing to Database
- Creating Tables on Network Activation
- Missing argument 3 for wp_register_sidebar_widget()
- How to Include a Loop Template File in a Plugin
- Write to / remove from default .htaccess file from plugin?
- What kind of data is that?
- Update Option Error: Notice: Undefined index
- How can I display a contact form for out of stock products in WooCommerce?
- Pass a php string to a javascript variable
- get shortcode value
- Cannot login to ADMIN even after changing password in phpmyadmin
- How to get number of Affected rows from wordpress dbDelta() function
- Unable to create new database table upon plugin activation using dbDelta
- Show price with Geo IP location
- Where to hook my plugin’s action
- WordPress Ajax Callback
- Add category to body class
- The called constructor method for WP_Widget in GFWidget is deprecated since version 4.3.0! Use
- Plugin Development sqlite or WordPress’ database
- How to review WordPress website php version compatibility?
- printf – problem to understand code
- Custom Post Type Plugin not loading category template and loading 404 instead
- Embed a Google Sheet as you view it in a separate tab?
- Sending email from inside a plugin using PHP PEAR
- Best way to hook a custom url?
- Auto delete WordPress users according to time
- How to cancel WordPress’ action/filter when using OOP with anonymous callback
- How to determine what is generating large amount of database queries?
- WordPress Plugin Page is Loading in Admin Content Container Instead of Separate Page
- How to trigger $_GET request within admin plugin page?
- Wp favorite posts get user favorites in profile using buddypress [closed]
- Storing Options in a Shortcode
- Why isn’t admin_notices displaying my text? [Simple Plugin, Beginner]
- Building an email signup form. Where should the information be saved in the DB?
- How to generate video out of images via WordPress plugin
- Saving Custom Post types and fields to a custom table
- How can I add an options page for my class based plugin?
- Sending WP posts to external API
- Retrieving a Value from a wp-database
- How can I get WordPress to save comments in markdown format?
- Need help restoring my WordPress blog
- add_query_arg not working
- problems with wordpress and php version 5.3.3-1
- WP plugins for building a database?
- WooCommerce get_price returning wrong price when used via ajax
- How to ‘clone’ a wp plugin to make small changes
- Open Post Thumbnail in New Child Theme File in WordPress
- add mediaelement.js plugins into WordPress video player control bar
- Shortcode button dosent work for all posts. Work for first post only
- Where does WordPress store plugin (enabled/disabled) status for multisite?
- Where should I save an API key of my user when installing my plugin?
- Prevent a plugin from being automatically activated
- Is Wrapping intval() Around esc_attr() Redundant for Escaping Input?
- Programatically download a plugin
- Accessing post’s meta data based on user’s click of a post
- Error shown for Trying to get property ‘roles’ of non-object in WordPress After Content for User Roles