- This topic has 30 replies, 4 voices, and was last updated 5 years, 1 month ago by
Paul.
-
AuthorPosts
-
December 31, 2019 at 6:02 am #1118250
Paul
Hi,
I recently created (Leo is familiar) a new custom post type called “Projects” – I’d like some help creating a custom hook for this CPT to display just like the single post. In addition I would like to have a page set up to display all the projects just like the blog page does for posts. Thanks!
December 31, 2019 at 1:54 pm #1118656Leo
StaffCustomer SupportHi there,
CPT should show up in the display rules by default. Is it not showing for you?
As for displaying posts for CPT, you could consider using this plugin:
https://en-ca.wordpress.org/plugins/wp-show-posts/December 31, 2019 at 7:47 pm #1118736Paul
Leo,
Sorry if my question was not clear.
The CPT shows up – my question is for formatting the pages.
I would like this page (CPT) https://www.trademarkinteriors.com/projects/kitchen-remodel-wyckoff-nj-3/ to look like this page format https://www.trademarkinteriors.com/wet-bar-vs-dry-bar-full-review-and-comparison-of-home-bars/
Thanks.
December 31, 2019 at 8:40 pm #1118748Paul
I would also like this page https://www.trademarkinteriors.com/projects to look like this page https://www.trademarkinteriors.com/blog/
Thanks!
December 31, 2019 at 8:42 pm #1118749Paul
I should clarify for the project page – I’m happy to use the WP show posts, just looking for a custom hero header.
January 1, 2020 at 10:38 am #1119201Leo
StaffCustomer SupportWould it work if you just add the CPT under the display rules of that header element?
January 1, 2020 at 11:05 am #1119227Paul
It worked for the single CPT, not for the project page https://www.trademarkinteriors.com/projects/
January 1, 2020 at 5:23 pm #1119370Leo
StaffCustomer SupportSorry what doesn’t work?
January 1, 2020 at 5:55 pm #1119388Paul
Adding the CPT to the the display parameters added the header properly.
I tried the same for this page https://www.trademarkinteriors.com/projects/ but the header does not appear. Looks like I will need help with a hook for this page.
January 1, 2020 at 6:09 pm #1119391Paul
At this point I just need a hook to display a hero image similar to the blog page except it will be a static image (blog page changes with latest post). Thanks!
January 1, 2020 at 8:46 pm #1119447Tom
Lead DeveloperLead DeveloperIn that case, you may want to create a new Header Element just for the projects page. That way you can explicitly set a hero image for it in the settings 🙂
January 2, 2020 at 5:03 am #1119698Paul
Tom,
Initially I tried that and it did not work so I believe I became confuse thinking I needed a hook element. I do see that there is a custom header element for merged header that applies to all pages, would I need to exclude the project page in that element in order for the new header element to work? Thanks.
January 2, 2020 at 7:41 am #1119967David
StaffCustomer SupportHi there,
that is correct, when using global rules such as All Pages, you need to also exclude any Pages that you wish to apply a separate Header Element too.
January 2, 2020 at 7:47 am #1119973Paul
Hi David,
Happy New Year to everyone!!
Good to know – I tried that and it still does not appear so I modified the hook for the blog to the following which worked! Just let me know why the header element does not work??
<h1>
Projects
</h1>January 2, 2020 at 8:45 am #1120025David
StaffCustomer SupportDo you have any other header elements that may be conflicting ?
-
AuthorPosts
- You must be logged in to reply to this topic.