Site logo

Archived topic

Hook after archive header / Wrapper for archive posts

15 replies · Started by Rafał on September 12, 2019

Viewing posts 1–15 of 16

Hi!
I need to wrap up set of articles, but not the archive header.
How to insert my stuff here?
Hook after archive header

I'm going to use the solution for search results as well.

Tricky, but works - for div wrapper tag. Thank you, Leo!

If used hooks generate_before_main_content & generate_after_main_content
Looks like that:

<div class="generate-columns-container">
  <div id="my-insert">
    <!-- articles -->
  </div><!-- .generate-columns-container -->
</div><!-- #my-insert -->

No problem :)

Not good enough…
It's about columns enabled. How to achieve correct order – before GP columns (inside columns-container)?

<div id="my-insert">
  <div class="generate-columns-container">
    <!-- articles -->
  </div><!-- .generate-columns-container -->
</div><!-- #my-insert -->

For your opening wrapper, does adding a lower priority work? For example, if you add 1?

Can't wrap the articles directly (adjacently), no matter the priority is.
I figured out another solution for my needs.
Thank you Guys for your efforts.

No problem :)

Are you considering creating this hook ? It would be really useful !

Hi there,

What exactly are you trying to do? The columns container is hooked in, so it's possible to hook elements around it if the priority is correct.

Hook content after the page-header (title / description) in an archive page...

You can use the generate_archive_title hook. If you're using a Hook element - you will need to select the Custom Hook to add that one.

Thanks David.

But if I use generate_archive_title, my content will be in the page-header (cf. html). Not really fan of that in term of HTML structure...

the generate_archive_title is the Hook that the page-header is hooked into.
Using that hook for your own content should place it outside of the page-header container.

Yes, it's outside the page-header but above in term of hierarchy. I want to hook between the page-header and my loop...

This archived topic is closed to new replies.