Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #427169

    Hello, hope you’re well !

    I have two questions:

    I have created an homepage named ‘Frontpage’ and a posts page named ‘blog’ (in appearance –> personnalisation)

    I have several categories for the posts (mostly photos) but I only want to display on my blog page, the posts from the category ‘blog’… I have found information about $query_post but I cannot apply it for the Enfold theme…

    Also, for the widget named ‘Enfold Child Combo Widget’, I don’t want that the posts from the ‘blog’ category to be displayed. How can I modify it ?

    Thank you very much for your support !

    Johann

    • This topic was modified 9 years, 7 months ago by johann_doe.
    #427670

    Hi johann_doe!

    1. Navigate to Dashboard > Enfold > Blog Layout and set the style option to “use the advanced layout builder”. Next edit your blog page and drag the blog posts element to your content and select the “Blog” category in the shortcode options. This will make it so only the posts in the blog category will display on your blog page.

    2. Open up /enfold/framework/php/class-framework-widgets.php and change line 935 from this.

    avia_get_post_list('cat=&orderby=comment_count&posts_per_page='.$posts);
    

    To this.

    avia_get_post_list('cat=-55&orderby=comment_count&posts_per_page='.$posts);
    

    Where “55” is the ID of the category you wish to exclude.

    Best regards,
    Elliott

    • This reply was modified 9 years, 7 months ago by Elliott.
    #427864

    Thanks a lot Elliott ! I totally forgot to use the advanced layout builder which do it very well :)
    Anyway, I have a minor concern: it is OK for my page http://localhost/xxx/blog/ (my blog posts are displayed there) but I don’t want that posts from the blog category be displayed for the generic URL http://localhost/xxx/category/blog/.
    Where do I have to include the condition to not display category ID = 23 in this URL ?

    Concerning the widget, it works well and I also deleted my blog category for recent posts, as below:
    avia_get_post_list(‘showposts=’. $posts .’&orderby=post_date&cat=-23&order=desc’);

    Thanks and best regards,

    Johann

    • This reply was modified 9 years, 7 months ago by johann_doe.
Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Only display posts from the 'blog' category in the 'blog' page’ is closed to new replies.