Closed shubhra14 closed 5 years ago
Is there somewhere specifically you're stuck?
Basically it would go something like:
'show_in_rest' => true
'custom_post_type' => RADL::endpoint( 'custom_post_type' )
routes.js
that uses your custom component along with a path like /custom_post_type
customposttype-archive.php
template ( can pretty much just look like index.php
until you want to start rendering server side, but it's needed because WP will want to render archive.php
which won't work with how the templates and components are currently structured )/custom_post_type/${slug}
and your template would be customposttype-single.php
There are different ways you can do it, but that's a general gist. You'll probably need to have a good idea of what's going on before you can start extending it effectively.
Hi, thank you for taking the time to respond.
I have done 1. & 2.
Can you elaborate a bit on the 3rd step? Do I need to duplicate+rename files in the src > components?
return {
request: {
type: 'posts', <--edit this?
slug: this.slug,
showLoading: true }
}
I am sorry if these are silly questions.
Edit: I was able to make it work. I want to thank you for helping me out
Not a problem at all. Glad you got it working
Hi,
How do I make custom post types work with this theme? I would really appreciate a bit of guidance.
Thank you