Trying to get 'photos' custom post type. Returns 'post' post type.
-
Hello,
I’m trying to access my custom post type ‘photos’
"photos": { "name": "Photos", "slug": "photos", "description": "", "labels": { "name": "Photos", "singular_name": "Photo", "add_new": "Add New", "add_new_item": "Add New Post", "edit_item": "Edit Post", "new_item": "New Post", "view_item": "View Post", "search_items": "Search Posts", "not_found": "No posts found.", "not_found_in_trash": "No posts found in Trash.", "parent_item_colon": null, "all_items": "Photos", "menu_name": "Photos", "name_admin_bar": "Photo" }, "queryable": true, "searchable": true, "hierarchical": false, "meta": { "links": { "self": "http:\/\/www.domain.com\/wp-json\/posts\/types\/photos", "collection": "http:\/\/www.domain.com\/wp-json\/posts\/types", "http:\/\/wp-api.org\/1.1\/collections\/taxonomy\/": "http:\/\/www.domain.com\/wp-json\/taxonomies?type=photos", "archives": "http:\/\/www.domain.com\/wp-json\/posts?type=photos" } }
But when trying to use the http://www.domain.com/wp-json/posts?type=photos url it returns the normal ‘post’ post type. What am I missing?
Many thanks for your time and help.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Trying to get 'photos' custom post type. Returns 'post' post type.’ is closed to new replies.