[Support request] Create Basic Page Template

Home Forums Support [Support request] Create Basic Page Template

Home Forums Support Create Basic Page Template

Viewing 15 posts - 1 through 15 (of 39 total)
  • Author
    Posts
  • #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.

    View post on imgur.com

    How can I make on page layout templates?

    #2379801
    David
    Staff
    Customer Support

    Hi 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

    #2379992
    Darryl

    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. :-/

    #2380163
    David
    Staff
    Customer Support

    As 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.

    #2380578
    Darryl

    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. :-/

    #2380594
    Fernando
    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/

    #2380606
    Darryl

    Never mind the step by step… I figured it out… That “Elements Controls” filter is a giant life / time-saver..

    #2380607
    Darryl

    whoops… didn’t refresh before my last post… thanks for the info

    #2380640
    Fernando
    Customer Support

    You’re welcome Darryl!

    #2380664
    Darryl

    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?

    #2380668
    Fernando
    Customer Support

    What specific Element are you referring to? Is it the Block Element – Site Header?

    #2380672
    Darryl

    Block Element – Content Template

    #2380674
    Darryl

    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

    #2380675
    Fernando
    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?

    #2380683
    Darryl

    Yup static page.. Figured it out …. Hook – Before Content

Viewing 15 posts - 1 through 15 (of 39 total)
  • You must be logged in to reply to this topic.