Open jakejackson1 opened 9 years ago
+1
+1
+1
+1
+1
@bearded-avenger, are you still maintaining this plugin? Without support for REST API v2 this plugin is useless. Thanks!
+1
If anyone's interested in an updated version of this plugin, I forked it and made it compatible with WP 4.7.2 and the most recent API. Also, some changes were made to accomodate multiple post type requests (since the newer API versions were pretty different, and that wasn't working anymore either). Shortcodes still work like they did. Also, there's a Relevanssi plugin compatibility fix inside as well (since the 2 are not compatible together out of the box).
@bearded-avenger I can take over the WP repo plugin if you like? just add me as contrib/author so I can update it for everybody else as well đź‘Ť
@Jany-M did you every release a working version? Your forked page doesn't allow us to post issues to let you know this plugin is not working with WP 5.1.1 using the same logic we used with WP Live Search v.9:
[wp_live_search multi="true" type="my-cpt,post,page"]
Your v2.0 seems to only search posts.
Oddly, version v.9 still works when the old v1.2.5 WP API is enabled. Although, that seems rather silly.
@djmtype my version was working perfectly fine up until at least 4.8. Have not tested it with a newer version though. If it's not working, it might have to do with changes in the API, however I'm pretty sure the API hasn't changed dramatically in recent times. The fork was necessary exactly because of significant changes in the API at the time, causing the original version to stop working altogether. Have you given it a try?
@Jany-M I get 404 errors that the search term can not be found. The search terms I try are either in a page or custom post type. So, while searching terms in a post
does work, they do not work for page
or my-custom-post-type
.
@djmtype that sounds like a routing issue. There are no 404 in case of no results. Make sure that you are getting results by testing eg. http://yoursite.com/wp-json/wp/v2/pages and your cpt. Also, I'm assuming you are using my fork, right?
Hi @Jany-M, looking at the routing… page
needs to be pages
, then it works!
I'll try it with my CPT later.
The routes are changes in the WP REST API v2 (currently being merged into the WP core) which would need to be addressed. Also, custom post type endpoints don't run through the 'post' endpoint any more and don't work when used in the shortcode 'type' attribute.