[Support request] Display post for a Category in home page

Home Forums Support [Support request] Display post for a Category in home page

Home Forums Support Display post for a Category in home page

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #635003
    Tinghua Huang

    Hi, I have a question about display post for a Category in home page
    I am using the sider library, everything works fine for me except in home page I only want to display post for a specific Category named “home-page”, I did a few research for the GeneratePress doc
    here is my code:
    add_filter(‘generate_blog_columns’, ‘generate_custom_post_archive_columns’);
    function generate_custom_post_archive_columns($columns)
    {
    if (is_category(‘home-page’)) {
    return true;
    }
    return $columns;
    }

    But my site is still looks like this, the first two post is belongs to “Uncategorized”, but they are been displyed, what I am doing wrong? Please help, thanks a lot.

    http://39.106.141.251/wordpress/

    GeneratePress 2.1.3
    GP Premium 1.6.2
    #635049
    Tinghua Huang

    I think I have almost reached my goal, after I install “WP show posts”, the great plugin writen by Tom, things became much more easier, but my home page (http://39.106.141.251/wordpress/), has a header in the content area (HOME PAGE and a hyphen at the second line), I don’t want that, dose any one know how to remove it, thanks!

    #635178
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    You can remove the title using the “Disable Elements” section of the “Layout” metabox: https://docs.generatepress.com/article/layout-metabox-overview/

    To remove the line, go to “Customize > Additional CSS” and remove this CSS:

    .single .entry-header::after, .page .entry-header::after {
        border-bottom: 1px solid #000;
        content: "";
        display: block;
        margin-bottom: 40px;
        padding-bottom: 40px;
        width: 2.5%;
    }

    Hope this helps 🙂

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