How do I perform a “get” call to an external API, and then display the JSON results on a page in my WordPress site?
Ended up developing a plugin using AJAX to make the calls to the API
Ended up developing a plugin using AJAX to make the calls to the API
Looking for a solution – slightly convoluted problem
You should use register_meta to add the meta field to the rest controller. Here the example from the link to expose the field my_meta of the custom post type my_article: register_meta(‘post’, ‘my_meta’, [ ‘object_subtype’ => ‘my_article’, ‘show_in_rest’ => true ]);
How to send data from a form created by a plugin to an external API?
Create or Update thousands of woocommerce products via PHP
Have you tried using savePost? https://developer.wordpress.org/block-editor/reference-guides/data/data-core-editor/#savepost
Line 756 is $dirlist = $wp_filesystem->dirlist($from);. The argument is ok. I think that the object $wp_filesystem is not globally available for your plugin.
It turns out that we need to get a date string from our DateTime object and pass that into the comment_date parameter instead. $comment_date = $the_date->format(‘Y-m-d H:i:s’);
I’m still relatively new to WordPress Development, but shouldn’t this code be in customizer.php, in the “inc” folder(which would be within your active theme’s folder)? Also I know the codex says this particular code is just for the live preview, but after adding it in one of my projects it seemed to fix my issue. … Read more
The tutorial from the link I provided was destroying the facebook session after login in and creating a new account for some reason. I just had to remove $facebook->destroySession(); from both parts and now everything is working as intended. Here is the code from the tutorial with both lines commented out. if ($fbuser) { $fb_registerpage_name … Read more