You need to move the .wp-pagenavi div containing the pagination content outside of the main block that is using grid layout. But still before the #secondary aside element. You don’t want the pagination content to be part of the grid layout.
Once outside of the grid layout you can float the div right to get it to be below the last post/apartment block. I suspect floating all the way right will place it under the sidebar instead of under the last post. You’ll likely need to set a right margin equal to the sidebar width, and maybe a bit more than the width so it aligns with the last post’s featured image’s right edge..
Hello, if we put the second .wp-pagenavi back in the <main/> block, then you can use the following CSS in the grid …
.site-main .wp-pagenavi {
grid-column: 1 / span 2;
}
Hope this helps and good luck!
Hi @sacconi , sorry, I didn’t understand the last question. Also, when I looked at the link, I’m curious why the first page has a div.navigazione2 block containing the second wp-pagenavi block. Shouldn’t all archive pages show the second wp-pagenavi block inside the main block?
EDIT: Scenario I described above is no longer true.
-
This reply was modified 2 years, 10 months ago by
Gerry. Reason: Issue I mentioned might just have been a caching issue
If you stay with the grid model, the span value needs to match the number of columns, which in turn depends on the total screen width. Thus you need a series of media queries to specify the correct span value for any given screen width.
Once you have the correct span value, float the child elements of div.wp-pagenavi right.