I'm consuming data from a wordpress site to my ionic app using the JSON api. I usually get the data from different post type with this url :


The problem that I have a website and I don't know the name of the post type( I can't access to the dashboard,it's not my website) How can I know the name of the post type to use it with the url?

this is the posts I want to get:


Thank you.

1 Answer 1


My sleuthing methods go like this:

  1. Look for an XML sitemap. If the site uses a common plugin like Yoast SEO and generates sitemaps, often the URLs will give you enough clues to figure out what the post types are named. Unfortunately, it doesn't appear this site is using any XML sitemap plugins.

  2. Look for other plugins. This site uses The Events Calendar. It's quite likely that they generate common post types on every site the plugin is used on - look through their docs or their source code and see if you can isolate the names.

  3. Look for feeds. For example, the main site feed (http://www.casting.tunisiebillet.com/feed/) lists a bunch of URLs on the site - they may give you clues as to the CPT names.

  4. You could just try "artistes" as most of the time, custom post type URLs match the name of the post type. You can also try "artiste" singular, which is the technically correct way to define the CPT name.

  5. Since you're using the REST API, try a request to wp-json/posts/types to list all post types. Keep in mind that the posts will only appear in the REST API if the site owner has enabled it for that post type. If the CPT was defined before the REST API, and they haven't gone back and enabled support, then they won't appear in the REST API at all.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.