Open djmtype opened 9 years ago
Also, I'm using WP Rest API v1.2.3 because v2 didn't work.
works fine here. same setup. make sure to use a correct post-type slug: https://codex.wordpress.org/Function_Reference/register_post_type special caracters are not allowed, so festival-event is wrong. make it festival_event or something like that.
@schliflo Whoops, the rewrite name is festival-event
, but my slug is festival_event
. Regardless, the issue persists when using [wp_live_search multi="true" type="festival_event,posts"]
.
Failed to load resource: the server responded with a status of 403 (Forbidden)
http://fakesite.org:8888/sandbox/wp-json/posts?type[]=festival_event&type[]=posts&filter[s]=steve&filter[posts_per_page]=20
Even using your example from the documentation fails, too, with the same kind of error.
[wp_live_search multi="true" type="page,posts"]
However, this works on its own: [wp_live_search type="festival_event"]
So does this: [wp_live_search type="posts"]
The following also work as intended: [wp_live_search]
and [wp_live_search type="page"]
.
For some reason it's unable to return more than 1 post type.
The are no other errors on my site, using WP 4.2.4 with WP Rest API v1.2.3
I'll set up a fresh install of WP, default theme, and test further if needed.
Actually, I have a local install of WP 4.3 with WP Rest API v1.2.3 and your plugin installed, no other plugins activated with TwentyFifteen theme.
From your doc's example, using, [wp_live_search multi="true" type="posts,page"]
http://spinline.dyndns.org:8888/sandbox/home-2/ Returns an error:
Failed to load resource: the server responded with a status of 403 (Forbidden)
http://spinline.dyndns.org:8888/sandbox/wp-json/posts?type[]=posts&type[]=page&filter[s]=image&filter[posts_per_page]=20
Make sure that you have custom permalinks enabled, which is required for wp api to work: https://github.com/WP-API/WP-API/issues/69
They are, always. Set to post name.
So i've set myself up a fresh wp instance to test it. ran into the same problem as you, because i copied your shortcode. [wp_live_search type="posts"]
is simply wrong. It should be [wp_live_search type="post"]
without the 's'. This probably works, because it defaults to 'post' somehow in single mode. In multi mode you get an incorrect string. Using [wp_live_search multi="true" type="festival_event,post"]
should work ;)
Good to know! FYI, In your documentation, there are a couple places where 'posts' needs to be changed to 'post'. Sorry, I never thought to try that. I was so focused by example I wasn't thinking clearly. Thanks for your hard work! On Sep 14, 2015 3:33 AM, "schliflo" notifications@github.com wrote:
So i've set myself up a fresh wp instance to test it. ran into the same problem as you, because i copied your shortcode. [wp_live_search type="posts"] is simply wrong. It should be [wp_live_search type="post"] without the 's'. This probably works, because it defaults to 'post' somehow in single mode. In multi mode you get an incorrect string. using [wp_live_search multi="true" type="festival_event,post"] should work ;)
— Reply to this email directly or view it on GitHub https://github.com/bearded-avenger/wp-live-search/issues/12#issuecomment-139984666 .
This is not my plugin, i am just using it and happened to see your problem ;) all the credit goes to @bearded-avenger
Regardless, thanks @schliflo for your time.
Using the following, a custom post type and posts together doesn't seem to work. It only works if I use one or the other.
[wp_live_search type="posts,festival-event" multi="true"]