Archived topic
Loop template for Category Archive
7 replies · Started by krllg4345 on March 8, 2023
Hi there, new to GP/GB. I just created a Loop template for a category archive following https://docs.generatepress.com/article/block-element-loop-template/ . It is displaying the post ok, however, the block seems to be wider than the expected width for the archive content. Using a similar loop as Element Type>Hook on the homepage works fine. Did I miss something with the Loop Template? Thanks
Hello there,
Look at the page, the Query Loop seems positioned correctly from my end.
To clarify, can you take a screenshot of the issue from your end?
Uploading Screenshots: https://docs.generatepress.com/article/using-the-premium-support-forum/#uploading-screenshots
Please see comments
I see. It's the Header that has padding.
Would you like to remove the padding of the header or add one to the Query Loop?
I'd prefer to add it to the query loop. Can you point me to that?
Hi there,
edit your loop template, and add Container Block, give it 40px Padding on Desktopm and a reduce padding for Mobile.
Then move the Query Loop block inside that,
Done, worked great. added different padding levels for desktop and mobile, it's looking perfect now. It took me a bit to be able to drag the query loop inside the new container block. for some reason didn't land inside on multiple attempts but got there in the end.
Yeah, the block editor is not the simplest thing to drag stuff around in.
If you add an empty paragraph block in the container first it gets easier.
And in the List View you can drag those items too
Glad to be of help.