[Support request] How could I re-design my Category Page

Home Forums Support [Support request] How could I re-design my Category Page

Home Forums Support How could I re-design my Category Page

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1865946
    Tuan

    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

    #1866084
    David
    Staff
    Customer Support

    Hi 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/

    #1866248
    Tuan

    Hi 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.

    #1866301
    David
    Staff
    Customer Support

    Is it this part you’re trying to match:

    2021-07-22_14-34-15

    #1867220
    Tuan

    Hi 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.

    #1867237
    Tuan

    I tried searching and come across Disable Elements, but it can only remove the Content Title (https://docs.generatepress.com/collection/disable-elements/).

    #1867513
    David
    Staff
    Customer Support

    OK – 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 to Author Archive.

    #1868862
    Tuan

    Hi 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.

    #1868976
    David
    Staff
    Customer Support

    1. 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.

    #1910085
    Josue

    Hello 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,

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.