Custom route for WP-API gives “rest_no_route” value
I may have the answer to this. I had POST in my code, but I was trying to look at the URL through a browser. Make sure you’re using the method you specify.
I may have the answer to this. I had POST in my code, but I was trying to look at the URL through a browser. Make sure you’re using the method you specify.
Why don’t you write a quick plugin … called “is user logged in” that registers a URL call. So the user hits the page, then the Flash or Java could just hit: http://mysite.com/customurl?hash=wordpress_logged_in_[hash] Then the plugin would run and return true or false. References: http://codex.wordpress.org/WordPress_Cookies#WP_.3E_3 This way you keep everything within reach of the WordPress … Read more
I finally managed to solve my issue, but not in the most elegant way : polling. I would still be interested in more elegant solution ! The main issue I have is that the point move is done in the iframe containing the site preview, whereas the theme customizer form inputs are in the main … Read more
Have you tried codex.wordpress.org/XML-RPC_Support. This code works, in conjunction with the IXR library found at incutio: include(‘IXR_Library.php’); $usr=”theusername”; $pwd = ‘thepassword’; $xmlrpc=”http://not-therealurl.com/xmlrpc.php”; $client = new IXR_Client($xmlrpc); $client -> debug = true; //optional but useful $params = array( ‘post_type’ => ‘post’, ‘post_status’ => ‘draft’, ‘post_title’ => ‘Test Post’, ‘post_author’ => 4, ‘post_excerpt’ => ‘This is my … Read more
That´s no big deal if you got the RSS feed, have a look at it. There is a pubDate which you can use to check for the age of the topic. strtotime() or anything alike will help you to check if that´s older than 30 days. And you also got a link-element. This leads you … Read more
If you want to use v2 of the API (which is the current one you should be using), the endpoint is mysite.me/wp-json/wp/v2/pages/1234 where 1234 is the page ID. https://developer.wordpress.org/rest-api/reference/pages/#retrieve-a-page
This is expected, as it depends on the context. The raw content will show up for the edit but not the view or embed context. It’s filtered through the WP_REST_Controller::filter_response_by_context() method. You can always add a new field to the response with register_rest_field() where the get_callback callback receives an input array with post data, including … Read more
I found a solution and thought to post it here as others might need it el(URLInput, { className: props.className, value: attributes.linkURL, placeholder: i18n.__(‘Set the specific url’), onChange: function( url ) { props.setAttributes({ linkURL: url }); } }) Does exactly what I need.
As of WP >= 4.7 filter[] is not supported and have been removed. Also WP REST API Plugin became part of WordPress Core. According docs your link should be: https://wptest.enguerranweiss.com/wp-json/wp/v2/posts?orderby=date&order=desc&after=2016-10-13T17:00:00 EDIT As enguerranws mentioned the date should be in ISO8601 format
To my knowledge this can’t be done out of the box. So you could make use of what get_post_galleries() or get_post_gallery(), the latter is just making use of the former, are doing by adding an endpoint. A minimal example could look like shown below. function rest_get_post_gallery( $data ) { //set FALSE for data output $gallery … Read more