- This topic has 7 replies, 3 voices, and was last updated 4 years, 5 months ago by
Elvin.
-
AuthorPosts
-
November 16, 2021 at 1:24 pm #2007010
Jean
Hello! How do I add blog posts to my category blog pages? If I post a recipe on my static homepage, how do I get this post to appear inside my recipe page as a custom designed thumbnail with header?
November 16, 2021 at 2:38 pm #2007057Ying
StaffCustomer SupportHi Jean,
Not sure I fully understand your question, if you created a new post and assigned a category to it, it should automatically show on the category archive page.
Can you link me to your site and explain a bit more?
November 16, 2021 at 2:48 pm #2007066Jean
Hi Ying!
I have separate “category” pages listed in my primary nav menu. For instance, when I post a recipe- I want that recipe to show up under the page that was created in the primary nav menu (Recipes- sub-menu desserts).November 16, 2021 at 2:56 pm #2007070Ying
StaffCustomer SupportYour site is in maintenance mode so I can’t see. Can you provide login in the private info field?
Do you mean you created a static page (actual page) to manually add the post thumbnail to that page?
If so, that does NOT sound right.
The better way to do is to create a content template using block element and apply the template applies the selected pages/archives.
For more info, please watch the video:
https://docs.generatepress.com/article/block-element-content-template/In this way, after you set up the content template, you don’t have to manually do anything, every post should be appearing automatically under its category pages and blog page.
Let me know if you need further assistance 🙂
November 16, 2021 at 9:17 pm #2007249Jean
Thank you! I did not manually add anything- but I was able to solve my dilemma of categories vs pages and have set this up correctly. I am using the content template block element for my category archive pages, but I need help with:
-How to get post title to appear under thumbnail
-How to custom layout the thumbnails so they are four per row (I realize I do not have enough posts for this yet, but I still want to configure the layout this way)Thanks again!! =) Please see private info.
November 16, 2021 at 10:12 pm #2007278Elvin
StaffCustomer SupportHi Jean,
-How to get post title to appear under thumbnail
You can use GenerateBlocks’ Headline block. GB’s Headline block has dynamic value that should allow you to set the dynamic post title for the post cards.
-How to custom layout the thumbnails so they are four per row (I realize I do not have enough posts for this yet, but I still want to configure the layout this way)
You can set the columns per row on category pages through Appearance > Customize > Layout > Blog as shown here – https://share.getcloudapp.com/v1ujPLNA
But this will apply to ALL archive pages. If you need this to apply on category archives only, you’ll need to do it with PHP snippets.
Example:
add_filter( 'generate_blog_get_column_count','tu_search_column_count' ); function tu_search_column_count( $count ) { if ( is_category() ) { return 25; } return $count; }Note: You have to watch this incase you’ve yet to see this.
It’s video guide to Block Element – Content Template.
November 16, 2021 at 11:15 pm #2007305Jean
Thank you, Elvin! Very helpful. I was able to get the post title to appear under the thumbnail!
I didn’t want posts to be in columns on my home page, so I added the snippet- but it made my home page into columns as well so I undid the appearance/customize/columns. I may have done something wrong…November 16, 2021 at 11:37 pm #2007312Elvin
StaffCustomer Supportbut it made my home page into columns as well so I undid the appearance/customize/columns.
If you don’t want the home page to be affected, that’s good that you undid it.
In this case, what you need is the PHP snippet I shared previously which is this one:
add_filter( 'generate_blog_get_column_count','category_column_count' ); function category_column_count( $count ) { if ( is_category() ) { return 25; } return $count; }Here’s how to add PHP snippets – https://docs.generatepress.com/article/adding-php/
-
AuthorPosts
- You must be logged in to reply to this topic.