Site logo

[Resolved] Content Template or Loop Template

Home Forums Support [Resolved] Content Template or Loop Template

Home Forums Support Content Template or Loop Template

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2460233
    PHILIP

    Is there a rule of thumb as to when I should use a …
    – Content Template (or)
    – Loop Template
    Please?

    The loop template has the pagination option but otherwise they seem fairly similar.

    What are the differences and is there any simple rational or reasoning I can go through to choose when to use which please?

    For instance…

    If it’s a blog or archive page use the loop template.
    However, if want to do this, this, or this … use the content template.

    Thanks.

    #2460288
    David
    Staff
    Customer Support

    Hi there,

    Content Templates:
    Use these for Single Posts / Singular templates ( this also includes things like 404 an No Results pages )
    And Archive Pages where you want to use Theme features such as Columns, Masonry, Infinite Load.
    They also allow you to mix multiple templates, so if you want a different template for different categories in your blog then you can.

    Loop Template
    Use these ONLY for Archives.
    Use them where you want block editor level control for designing your grid and where you want to add other content around the loop without having to use other block elements.

    #2460837
    PHILIP

    Thanks David

    This is what I’ve gathered so far…

    The content template designs the way a single post is listed in the post grid. This will be repeated as many times as you have posts to display.

    But it does not let you design the page above or below the grid of posts.

    The loop template lets you build an introductory section above the post grid and a section below the post grid.

    Also consider if you want to use the customiser settings to show or hide the featured image, display posts in columns or masonry layout, and display the read more link as a button.

    Have I got this right?

    #2461419
    David
    Staff
    Customer Support

    The content template designs the way a single post is listed in the post grid. This will be repeated as many times as you have posts to display.

    Correct.

    [content template] But it does not let you design the page above or below the grid of posts.

    Correct – you would need to use other Block Element Hooks to add content before / after posts.

    Also consider if you want to use the customiser settings to show or hide the featured image, display posts in columns or masonry layout, and display the read more link as a button.

    Correct for Content Templates with exceptions; the customizer will only control the columns, masonry, infinite scroll and spacing options. Featured images, read more and other elements that are displayed will be set in the Content Template.

    The loop template lets you build an introductory section above the post grid and a section below the post grid.

    Correct.

    #2461442
    PHILIP

    Thanks David

    This gives me a much clearer understanding of when to use the content template and when to use the loop template.

    #2461541
    David
    Staff
    Customer Support

    You’re welcome

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