Site logo

Archived topic

Block Element Content On Homepage

3 replies · Started by Jeremy on March 2, 2022

Viewing posts 1–4 of 4

Hi, I followed the tutorial on creating these cool-looking block elements ( https://docs.generatepress.com/article/block-element-content-template/ ) and the blocks look amazing on the blog page.
Now I would like to have 2 separate sections (one under the other) that display articles from 2 separate categories and I would like to do this on my homepage. You can see the layout here https://expertdogfood.com but you'll notice that the grid of articles don't have the style from the tutorial. I have tried everything I can think of to get them to reflect the tutorials style but all I can do is assign the homepage as the blog page and even then I can't create 2 separate sections based on categories. Any quick ideas or is this just so complicated it's likely not worth doing?

Thanks

Hi Jeremy,

To add sections of posts of specific categories, you may use a Query Loop Block.

See: https://share.getcloudapp.com/NQuNkdBX

Also see: https://share.getcloudapp.com/rRu1yEmo

Alternatively, you may use a plugin like WP Show Posts, a plugin soon to be merged with GenerateBlocks.

See: https://wpshowposts.com/

However, in both of these approach, the Content Template still wouldn’t take effect. Content Templates only take effect on the main Query Loop like the posts in the main Blog page, any category/archive page, etc. You’ll need custom CSS to alter the design of these custom queries. You may also try other plugins and see if any works for you.

Hope this clarifies. :)

Ok, thanks for the help.

Jeremy

You’re welcome Jeremy! Feel free to reach out if you’ll need assistance with anything else. :)

This archived topic is closed to new replies.