Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fetch posts with a specific post type #34

Merged
merged 2 commits into from
Apr 24, 2020

Conversation

Cobolt77
Copy link
Contributor

/wp-json/wp/v2/posts/ becomes /wp-json/wp/v2/<post_type>/

/wp-json/wp/v2/posts/ becomes /wp-json/wp/v2/<post_type>/
@Cobolt77 Cobolt77 changed the title Fetch post with a specific post type Fetch posts with a specific post type Apr 23, 2020
@Cobolt77 Cobolt77 closed this Apr 23, 2020
@Cobolt77 Cobolt77 reopened this Apr 23, 2020
This was referenced Apr 23, 2020
Copy link
Collaborator

@SachinGanesh SachinGanesh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let the default type be "posts" instead of null. You can use the same URL instead of null check. It will be easy for others to use the API

@Cobolt77
Copy link
Contributor Author

Sorry! Haven't thought of that! It's my first time contributing to someone else's code!

@SachinGanesh SachinGanesh merged commit 83260f0 into dreamsoftin:master Apr 24, 2020
@SachinGanesh
Copy link
Collaborator

Thank you for the PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants