Connecting to WordPress database using mysqli from another server with wp-blog-h
-
I am currently building an internal one-page quote form that will need data from a WordPress website. It will require different ACF fields for each product from a custom post type. The website have to be on different servers so I can’t just require wp-blog-header.php from the quote form. Is there anything I can do to connect to wp-blog-header.php so I can use ACF functions to call the custom fields or if not is there a neater way to output the ACF fields data?
This is what I currently have for the meta data data.
SELECT wp_posts.ID, wp_posts.post_title, wp_posts.post_name, wp_postmeta.meta_key, wp_postmeta.meta_value FROM wp_posts, wp_postmeta, wp_term_relationships WHERE wp_posts.post_type = "products" AND wp_posts.post_status = "publish" AND wp_posts.ID = wp_postmeta.post_id AND wp_postmeta.post_id = wp_term_relationships.object_id ';
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Connecting to WordPress database using mysqli from another server with wp-blog-h’ is closed to new replies.