Topic Resolution: Resolved
  • Creator
    Topic
  • #17977

    Alessandro Buzzi
    Spectator
    Been thanked: 0 times

    Is there a way to filter/exclude post categories from displaying in blog homepage ?

    thanks

Viewing 3 replies - 1 through 3 (of 3 total)
Replies
  • Denzel Chia
    Moderator
    Post count: 3223
    Been thanked: 129 times
    #17978 |

    Hi,

    That would required a custom query using WP_Query class. https://codex.wordpress.org/Class_Reference/WP_Query
    Sorry we do not support custom coding. Please kindly hire a developer to assist you.

    However, you could built a homepage using Theme4press core plugin’s recent_posts shortcode, which supports exclude category, but it will only show a fixed number of posts.

    Thanks!
    Denzel

    Alessandro Buzzi
    Spectator
    Post count: 6
    Been thanked: 0 times
    #17998 |

    Thanks but I’d rather have the “blog layout” in homepage, category filtering is an important feature in a theme

    we’re editing content-blog.php but it doesn’t seem to affect the homepage (blog), can you suggest the right template?

    Alessandro Buzzi
    Spectator
    Post count: 6
    Been thanked: 0 times
    #17999 |

    Solved editing content-blog.php wp_query (line 47 + rem line 48) and setting a static page (template blog) as homepage than using recent-post shortcode in the secondary page to show the category excluded in homepage.

    maybe it will help someone else

    regards

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