[Support request] Custom Archive Layout

Home Forums Support [Support request] Custom Archive Layout

Home Forums Support Custom Archive Layout

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #2166346
    Martin

    Hi there. I would like to use custom fields and layout in Archives (lists of custom posts).
    Could you advise what location I need to put the Hook Element if that’s the right approach or advise what is the best approach?

    Thank you.

    #2166395
    Ying
    Staff
    Customer Support

    Hi Martin,

    Are we talking about custom post type archive?

    What kind of layout are you trying to achieve?

    Let me know 🙂

    #2166417
    Martin

    It is for a custom post type archive but I want to customise the layout for all archives.

    #2166422
    Ying
    Staff
    Customer Support

    You can create block element – content template to create a custom look of archives:
    https://docs.generatepress.com/article/block-element-content-template/

    And here’s a video demonstrate how to access custom fields in block element:
    https://youtu.be/Ff7ikQ7Yw0w

    The location of the element would be custom post type archive, for example, if your custom post type is movie, then you would see Movie Archive in the location dropdown.

    #2166469
    Martin

    Hi. I have the right location selected but can’t find where to customise the contents of the archive loop.
    I don’t want to create a hero section. Not sure if I am using the correct wording here but it’s the contents of the ‘loop’ that makes the list of posts I am looking to customise.

    Thanks.

    #2166474
    Martin

    I figured it out…
    generate_after_entry_title hook.

    #2166484
    Martin

    Although I am trying to disable thumbnail (featured image) in all archives.
    Tried it by disabling the featured image in a layout element applied to ‘all archives’ but not managed to disable the featured image.

    #2166485
    Ying
    Staff
    Customer Support

    Select content templateas the element type, you should not need to select hook.

    #2166492
    Martin

    ‘Content Template’ as an Element type?
    Not seen that type of Element?

    #2166495
    Ying
    Staff
    Customer Support

    Here’s the documentation of the block element – content template, there’s also a demonstration video which should be helpful:
    https://docs.generatepress.com/article/block-element-content-template/

    #2166513
    Martin

    Thanks. I’m a bit out of practice with GeneratePress so I have some learning to do with blocks. Although I’ve had premium for many years I’ve not built with it for a couple of years so I’m a bit rusty.

    #2166519
    Ying
    Staff
    Customer Support

    It’s ok!

    The block element – content template is still a new thing to a lot of GP users, it’s normal if you haven’t tried play with it!

    It’s a really powerful tool, hope you’ll enjoy building site with it!

    Just let us know if you run into problems 🙂

    #2166528
    Martin

    I created a simple block but can’t see how to apply it to my custom post type archives. Archives are not essential to the project I’m working on but it would be handy to figure out how to work with them in GP.

    #2166532
    Ying
    Staff
    Customer Support

    Make sure you watch the video carefully and understand how each step works.

    Once the content template is built, select the custom post archive as location.

    It should apply to your custom post archive page.

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