Coder Social home page Coder Social logo

404 when filtering by post type about wp-api HOT 8 CLOSED

wp-api avatar wp-api commented on June 14, 2024
404 when filtering by post type

from wp-api.

Comments (8)

abulte avatar abulte commented on June 14, 2024

I get a 200 but the data is not filtered by post_type. Out of curiosity: why would it work? Seems inconsistent with the doc.

from wp-api.

abulte avatar abulte commented on June 14, 2024

Just to be clear: when querying http://lpdf.dev/wp-json.php/posts?type=faute I get the correct data but the status code is 404.

from wp-api.

abulte avatar abulte commented on June 14, 2024

For those passing by, I ended up circumventing the problem by creating my own endpoint based on my custom post type, just follow the docs: https://github.com/WP-API/WP-API/blob/master/docs/guides/extending.md

from wp-api.

rachelbaker avatar rachelbaker commented on June 14, 2024

@abulte Is there anything that still needs attention in this issue to be resolved?

from wp-api.

abulte avatar abulte commented on June 14, 2024

@rachelbaker thanks for checking in. Like I said I got around the problem by using a custom endpoint. So the original bug may still be present, we need to test against the latest release which I haven't had a chance to do. But if nobody else has complained about that...

from wp-api.

rmccue avatar rmccue commented on June 14, 2024

I suspect this is related to the same issue that made #46 necessary. Can you try using the latest version from here and see if that fixes it? :)

from wp-api.

rachelbaker avatar rachelbaker commented on June 14, 2024

@abulte To clarify....you should be able to GET all posts of a certain post type by passing the query string. However, you cannot POST data using a query string url. I am not sure if that is the issue here, but I know our documentation surrounding this could use some clarification.

from wp-api.

rmccue avatar rmccue commented on June 14, 2024

Closing, as we don't have any further feedback. Let me know if we can do anything further here.

from wp-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.