[Resolved] header for archive and category page

Home Forums Support [Resolved] header for archive and category page

Home Forums Support header for archive and category page

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #1588412
    Anders

    Hi!
    I tried to add header to category pages and date archive pages. I followed your docs but it’s from 2017.
    “Adding Page Headers to Taxonomies”. I think I figured it out anyway but something is missing because there is no change. I want a full width light yellow color header background in the same way as my pages.

    instead a new error appeared. When I visit either a category page or a date archive page the footer widget number 4 has changed position vertically.

    How to fix these things? See links below

    #1588517
    Leo
    Staff
    Customer Support

    Hi there,

    The article you’ve checked is likely too old.

    Can you try using a header element instead? Here is all the relevant info:
    https://docs.generatepress.com/article/header-element-overview/
    https://docs.generatepress.com/article/page-hero-examples/
    https://docs.generatepress.com/article/how-to-create-a-page-hero/

    The display rules you need would be: Post Category Archives.

    Let me know if this helps ๐Ÿ™‚

    #1588738
    Anders

    I followed the guides but it doesn’t work. I can not see the light yellow background.

    And the widget 4 is still in the wrong position.

    See screenshots and links below. It’s in Swedish but for the “rules” I chose:
    post category archive
    date archive

    #1589060
    David
    Staff
    Customer Support

    Hi there,

    the 4th footer widget misalignment is because of this CSS that is in the Customizer > Additional CSS:

    .archive .widget_recent_entries {
        margin-top: 60px;
        margin-bottom: 60px;
    }

    Delete that to fix the alignment.

    The header element – do you have any Content added to the Header Elements text area ?
    There has to be some content for it to display, if you just want the background color then add a HTML Comment like so:

    <!-- archive hero -->

    Comments won’t display on the front end but will make the element display.

    #1589106
    Anders

    Thanks, yes the widget was wrongly targeted in my CSS so that fixed it, great!

    The other problem remains. No matter what I do I see no change. I even added a bockground image but it did not display.

    I added the comment as you suggested but no change

    I also added this code, but no change
    <!– archive hero –>
    {{post_terms.taxonomy}}

    #1589406
    David
    Staff
    Customer Support

    There is a possible Header Element conflict, if you have multiple Header Elements that have overlapping Display Rules eg. one set to Entire Site and a second one set to a specific rule such as Post Category Archives then which ever one is published first will be displayed.

    Would you mind providing me with temporary admin access so i can take a look?

    #1589474
    Anders

    ok, see below

    #1589525
    David
    Staff
    Customer Support

    Ok so i can see the two missing header elements when i am Logged In. Which may be a caching issue. Do you have any cache plugins or server side caches enabled ? If so can you trying clearing them.

    For archives – do not use: {{post_terms.taxonomy}}
    This is only for use on Single Posts. Instead use the {{post_title}}

    #1589694
    Anders

    OK, I will contact server support. Thanks a lot!

    #1589844
    David
    Staff
    Customer Support
    #1589857
    Anders

    OK, they have replied. I have a cache plugin and I can clear cache and clear minfied css, but that didn’t help in this case. I tried to deactivate my cache plugin but that didn’t help either.

    Their answer roughly translated:

    “Have no idea why this is happening. We don’t have server side cache. I can however see that the css looks different on the “live” page compared to “admin” page. On the live page the row is read with the class “page-title” and the admin page with the class “page-hero” Are you changing the css directly?”

    #1589894
    David
    Staff
    Customer Support

    One thing i didn’t check – in the Header Element Display Rules, can you check that NO Users rules are set?

    #1590185
    Anders

    oh dear! I didn’t think about that. I had it on “admin”. Great, it works now-thanks and merry Christmas!

    #1590305
    David
    Staff
    Customer Support

    I should have checked ๐Ÿ™‚
    Glad to be of help and Merry Christmas to you!

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