Display Custom Post Type on a WordPress Page
-
Hi
I am working on a website about a disused Church and Graveyard that a group of people are going to restore it for events etc. The church has a graveyard and since it was a family run church there are at least 4 Barons buried there so it is of historical interest to the local community and vistors. Ideally, we want to add the graves to the website and who is buried there.I have created a Custom Post Type called Graves and I can get it working on the template files. But I’d rather create a normal WordPress Page called Graves and add some relevant written content first and below that, the Custom Post Type called Graves would populate it like an archive page.
I was thinking that I would need an actual Template file (Template Name: Graves Page Template) that would show up in the Page Attributes and I could select it for that particular page called ‘Graves’ and that would show me all the added graves as well as the written text above.
In the archive-grave.php template I have added the written content and it does what I want but it is not ideal as only I can change or add to the written content.
So how can I do it please?
Kind regards
Colin
- The topic ‘Display Custom Post Type on a WordPress Page’ is closed to new replies.