- This topic has 38 replies, 3 voices, and was last updated 5 months ago by
David.
-
AuthorPosts
-
October 20, 2022 at 1:05 am #2379651
Darryl
Hey fellas…
With most themes there are “Edit” and “New” buttons underneath the Default Template section when creating a new page.
With GP those rather useful buttons are not available.
How can I make on page layout templates?
October 20, 2022 at 3:41 am #2379801David
StaffCustomer SupportHi there,
thats not something GP would do.
Registering custom templates requires a Child Theme.And see my reply below regarding setting up a custom template:
https://generatepress.com/forums/topic/can-not-find-template-in-pages-attributes/#post-2306945
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/October 20, 2022 at 7:07 am #2379992Darryl
Thanks for the reply.. and info.. will give it another good read in the morning, when my “lights” are on… curiosity question, are there any future plans to enable custom page templates using the way that I described (without necessitating child themes)… in light of the whole block editing revolution etc, etc, the child theme usage requirements seems to be more and more a limitation, rather than an advantage…
My scenario…
I simply want to define 4 page templates:
1. Donor – Bill with headline and navigation links (and default site elements)
2. Donor – Betty with headline and navigation links (and default site elements)
3. Donor – Lebron with headline and navigation links (and default site elements)
4. Recipient – Jason will headline and naviigation links (and default site elements)All with blank content, so that I can speed up my page creation.
But there doesn’t seem to be good way to do something simple. Digging under the hood to set up a child theme feels like overkill. :-/
October 20, 2022 at 7:59 am #2380163David
StaffCustomer SupportAs a traditional PHP based theme the only way to add those templates is via a Child Theme or a Plugin.
Block Based themes have a minor advantage here as they use HTML Based Templates, allowing you to save a block edited page as a template. The downside of doing so however is quite sizeable, as HTML templates don’t do dynamic data like PHP templates. So you’re limited to blocks or shortcodes to do more complex stuff.The GP approach here is the Elements module.
You can use a Block Element – Content Template and in GPP 2.2 ( in beta ) you can do LoopM Templates.This only leaves which method to select those templates.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/October 20, 2022 at 5:24 pm #2380578Darryl
Can you expand on this?
The GP approach here is the Elements module.
You can use a Block Element – Content Template and in GPP 2.2 ( in beta ) you can do LoopM Templates.This only leaves which method to select those templates.
step-by-step… my caffeine IV drip appears ineffective. :-/
October 20, 2022 at 5:57 pm #2380594Fernando Customer Support
Hi Darryl,
Here’s the reference for Block Element – Content Templates: https://docs.generatepress.com/article/block-element-content-template/
Here’s the reference for Block Element – Loop Templates: https://docs.generatepress.com/article/block-element-loop-template/
The Loop template is generally made in conjunction with a GenerateBlocks Query Loop Block: https://docs.generateblocks.com/article/query-loop-overview/
October 20, 2022 at 6:20 pm #2380606Darryl
Never mind the step by step… I figured it out… That “Elements Controls” filter is a giant life / time-saver..
October 20, 2022 at 6:21 pm #2380607Darryl
whoops… didn’t refresh before my last post… thanks for the info
October 20, 2022 at 8:20 pm #2380640Fernando Customer Support
You’re welcome Darryl!
October 20, 2022 at 9:10 pm #2380664Darryl
Now that I know how to add the navigation menus via a gp block element pages….
question:
I have some pages with content, but no nav. when I add the block element nav, it seems to remove all the content that was previously on the page.. How do I stop that behavior?
October 20, 2022 at 9:19 pm #2380668Fernando Customer Support
What specific Element are you referring to? Is it the Block Element – Site Header?
October 20, 2022 at 9:22 pm #2380672Darryl
Block Element – Content Template
October 20, 2022 at 9:29 pm #2380674Darryl
I get my error.. the top nav.. needs to be something other than content template…. what appears above the content block?
Figured it out …. Hook – Before Content
October 20, 2022 at 9:32 pm #2380675Fernando Customer Support
Are you adding this to a static page? The Content Template overrides the layout of the Main Query. It’s generally used for Archive Pages.
What specifically are you wanting to add to your Pages – how would you like them to look like?
October 20, 2022 at 9:41 pm #2380683Darryl
Yup static page.. Figured it out …. Hook – Before Content
-
AuthorPosts
- You must be logged in to reply to this topic.