- This topic has 8 replies, 2 voices, and was last updated 2 years, 9 months ago by David.
-
AuthorPosts
-
July 22, 2021 at 2:08 am #1865946Tuan
Hi GeneratePress Support,
I’m trying to implement my category page to design like this: https://gardenhelpful.com/pest-control/
Could you point me to where to start, and how to implement that design. I have GenerateBlocks, and have a GeneratePress Pro license.
Thank you,
Tuan
July 22, 2021 at 3:32 am #1866084DavidStaffCustomer SupportHi there,
this document explains how to use the Block Element and GenerateBlocks to build your own post content templates:
https://docs.generatepress.com/article/block-element-content-template/
July 22, 2021 at 6:00 am #1866248TuanHi David,
Thanks for your help, but I don’t think it’s what I look for.
I’m trying to redesign my Archive page (Category/Author Page). What is the Hook place that I need to implement to take over the Content?
Ultimately, I want my Category page to look something like this: https://gardenhelpful.com/pest-control/
Thanks,
Tuan.
July 22, 2021 at 6:34 am #1866301July 22, 2021 at 9:12 pm #1867220TuanHi David,
I’ve made a Loom Video walkthrough to explain what I mean: https://www.loom.com/share/37654bc380044f1fa0c00744dce4993b
The URL in the video is here: https://constantdelights.com/author/admin
To sum up the video questions:
1) I want to replace the existing content of the Category Page with my own. How can I do that, instead of hooking into
2) I want to have the dynamic info in order to control the display of my post (only display posts from a certain author). How can I get that information from Generate Press.Thanks,
Tuan.
July 22, 2021 at 9:44 pm #1867237TuanI tried searching and come across Disable Elements, but it can only remove the Content Title (https://docs.generatepress.com/collection/disable-elements/).
July 23, 2021 at 3:43 am #1867513DavidStaffCustomer SupportOK – so the way i would approach this is to use the theme templates – and NOT hook in your own Posts Block.
1. Enable Columns and set them to 3 columns on the Author Archive by adding this PHP Snippet:
add_filter( 'generate_blog_columns', function( $columns ) { if ( is_author() ) { return true; } return $columns; } ); add_filter( 'generate_blog_get_column_count','tu_search_column_count' ); function tu_search_column_count( $count ) { if ( is_author() ) { return 33; } return $count; }
2. Create a new Block Element – Content Template:
https://docs.generatepress.com/article/block-element-content-template/
And use the GenerateBlocks and GPP Blocks to create your post ‘card’ design.
Set the Display rules toAuthor Archive
.July 24, 2021 at 3:36 am #1868862TuanHi David,
Thank you for your suggestion. Here is the setback I foresee with the approach:
1) The column number is set as 3, so there is no way I could do to account for mobile responsive.
Question:
1) Is there really no way to have a function to detect if it’s a category archive, then returns nothing for the content, so the Theme Builder could take over?
Thank you very much
Tuan.
July 24, 2021 at 5:52 am #1868976DavidStaffCustomer Support1. It will respect the Customizer settings for other columns. ie. 3 will drop to 1 on mobile. We can provide some CSS if you want that to behave differently?
2. It is possible, but if you require additional authors ( now or in the future ) you would need to create a separate element for each author.
Option #1 is the more efficient way of doing things as well. Let me know.
August 27, 2021 at 6:47 am #1910085JosueHello David,
I’m editing my post category pages too. I’m trying to create 3 or 4 columns. I guess the snippet above that you provided above is the best way to do so? and if so, where exactly do I add this snippet?
Thanks,
-
AuthorPosts
- You must be logged in to reply to this topic.