[Support request] How to I get two Elements to show on a page?

Home Forums Support [Support request] How to I get two Elements to show on a page?

Home Forums Support How to I get two Elements to show on a page?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #964778
    Jude

    I created 2 elements for my blog

    Element #1 http://prntscr.com/oitw2h :- this shows only on the home page.

    Element #2 http://prntscr.com/oitxao :- this shows everywhere apart from the home page.

    I want Element #2 to also show on the homepage above element #1.

    How do I do this?

    #965172
    Leo
    Staff
    Customer Support

    Hi there,

    Are they both header elements currently?

    If so you will need to add one of the elements using the after_header hook:
    https://docs.generatepress.com/article/hooks-element-overview/

    #965219
    Jude

    I used hook now but there is no option to make it contained or change the colour.
    http://prntscr.com/oj04le

    How do I do this?

    #965370
    Leo
    Staff
    Customer Support

    Wrap the content in HTML like this:
    <div class="grid-container recent-posts-hook">recent posts container</div>

    Then you should be able to target it with CSS:

    .recent-posts-hook {
        background-color: #ffffff;
    }
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.