Does it still make sense using json endpoint ep_mask now that there’s the new rest api? [closed]

I think you should stop using rewrite endpoints to handle JSON responses. Instead you can and you should use the REST API. So, instead of this: function makeplugins_add_json_endpoint() { add_rewrite_endpoint( ‘json’, EP_PERMALINK | EP_PAGES ); } add_action( ‘init’, ‘makeplugins_add_json_endpoint’ ); And then handle the JSON response at your own, you can and you should do … Read more

Confused about AngularJS and WordPress

Unfortunately I don’t know Angular to give you a hand with that, but I’m seeing this question is related to another about consuming an endpoint with a filter by meta_key (by the way, I’ve updated my previous response with a very simple jQuery-only code to show posts retrieved in a list). However, if you don’t … Read more

WP-RestAPI and xml sitemap

Let’s assume your plugin is writing to the /usr/share/wordpress/sitemap_index.xml filesystem location, but you want it can be accessed through http://www.website.com/sitemap_index.xml as if the xml file were stored in /var/www/html/sitemap_index.xml. You can use the alias directive then, available in mainstream webservers Apache and NginX: For an alias in NginX, you put this inside the server of … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)