- This topic has 15 replies, 3 voices, and was last updated 2 years, 3 months ago by
David.
-
AuthorPosts
-
September 12, 2019 at 11:14 am #1008032
Rafał
Hi!
I need to wrap up set ofarticle
s, but not the archive header.
How to insert my stuff here?
I’m going to use the solution for search results as well.
September 12, 2019 at 11:19 am #1008038Leo
StaffCustomer SupportHi there,
Add this PHP snippet to re-hook the archive title first:
add_action( 'after_setup_theme', function() { remove_action( 'generate_archive_title', 'generate_archive_title' ); add_action( 'generate_before_main_content', 'generate_archive_title', 3 ); } );
Adding PHP: https://docs.generatepress.com/article/adding-php/
Then this should work:
https://www.screencast.com/t/T2Egcbs8g0gLet me know 🙂
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/September 12, 2019 at 11:33 am #1008045Rafał
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 -->
September 12, 2019 at 11:38 am #1008048Leo
StaffCustomer SupportNo problem 🙂
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/September 12, 2019 at 12:31 pm #1008100Rafał
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 -->
September 12, 2019 at 5:26 pm #1008245Tom
Lead DeveloperLead DeveloperFor your opening wrapper, does adding a lower priority work? For example, if you add
1
?Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentSeptember 12, 2019 at 11:05 pm #1008358Rafał
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.September 13, 2019 at 8:42 am #1008767Tom
Lead DeveloperLead DeveloperNo problem 🙂
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentOctober 24, 2020 at 12:03 pm #1502724Fabien
Are you considering creating this hook ? It would be really useful !
October 25, 2020 at 11:51 am #1503808Tom
Lead DeveloperLead DeveloperHi 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.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentOctober 25, 2020 at 2:31 pm #1503907Fabien
Hook content after the page-header (title / description) in an archive page…
October 26, 2020 at 2:56 am #1504315David
StaffCustomer SupportYou 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.Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/October 26, 2020 at 7:01 am #1504598Fabien
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…October 26, 2020 at 7:55 am #1504916David
StaffCustomer Supportthe
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.Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/October 28, 2020 at 1:55 pm #1508522Fabien
Yes, it’s outside the page-header but above in term of hierarchy. I want to hook between the page-header and my loop…
-
AuthorPosts
- You must be logged in to reply to this topic.