Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1204326
    Pollito69
    Participant

    Hello,

    My pages are set up with Ethos and Woocommerce, and I would like to add separate Blog pages to store articles and stories.

    I created the placeholder – please see here: http://uniquegiftsandart.com/blog/

    I want to make my Blog pages to look similar to this: http://demo.theme.co/integrity-4/blog/

    What do I need to set up to make the Blog page work and not mess up my current setup?

    Thank you!

    #1204489
    Friech
    Moderator

    Hi There,

    Thanks for writing in! Please navigate to Settings > Reading and set your Blog page as the Posts page. You wont be able to edit this page on the backend anymore, but it will automatically populate your posts items.

    Hope it helps, Cheers!

    #1204517
    Pollito69
    Participant

    Thanks for your quick reply.
    However, I’m not sure I should do that, and this is why I’m asking this question. I have my Home page setup so that the carousel is rotating 3 “standard” posts that I will keep the same – please see the attachment of the 3 standard posts that I do not want to change on my Home page.

    My question is how can I set up a separate Blog page without affecting this setup?

    I have also attached my current settings -> Reading screenshot.

    Thanks!

    #1204589
    Rupok
    Member

    Hi there,

    Thanks for clarifying. So as you are using your home page as blog index page, you can’t set separate blog page. But you can use Recent Posts element to create another page to show blog posts. Since Recent Posts element or shortcode is limited to four posts per instance, you can use Essential Grid or The Grid to create your blog page.

    Hope this helps.

    #1205203
    Pollito69
    Participant

    Thanks for the information.

    Can you please clarify the what is the difference between The Grid and the Essential Grid? Any pros/cons etc. would be helpful.

    Do I need to use both Recent Posts and a Grid, or just one?

    The basics steps that I need to follow to make this work would be greatly appreciated.

    Thanks!

    #1205233
    Rahul
    Moderator

    Hey There,

    Thanks for writing back!

    We don’t have any knowledge about the difference between the two, but you can always check their respective documentation and compare the available features.

    http://essential.themepunch.com/

    http://theme-one.com/docs/the-grid/

    Hope this makes some sense!

    #1205506
    Pollito69
    Participant

    Thanks. I have one more question that was not answered in your last answer above:

    Ref. your #1204589:
    But you can use Recent Posts element to create another page to show blog posts. Since Recent Posts element or shortcode is limited to four posts per instance, you can use Essential Grid or The Grid to create your blog page.

    –> my question: does this mean that I need both Recent Posts and Essential Grid, or just one of them?

    Thanks!

    #1205802
    Nabeel A
    Moderator

    Hi again,

    You can use Essential Grid only for displaying blog posts.

    Hope this helps!

    #1214101
    Pollito69
    Participant

    Hello,

    Thanks for the information. I used “The Grid” according to your instruction above to create my new Blog page and it looks great. However, now the new Blog page post shows up also on the Home page. Please see the attachment. The new blog post is circled with red. This should only show up in the Blog page.

    My Home page should only show the 3 posts that I have created as the “home age themes”. How can I prevent the Blog posts I will be creating (like the one in the screenshot) – that are on my “The Blog” page from displaying in the Home page?

    I’m using a different author for the Blog posts and for the Home page posts. Could this be used?
    Thanks!

    #1214343
    Rad
    Moderator

    Hi there,

    Your home page is a blog page too, hence, it will display all posts you’ll display. If you wish to alter your home page, then use static home page and the grid too, then apply filtering to exclude specific posts.

    OR, display your posts by category, example, please add this code to your chid theme’s functions.php

    function filter_cat_homepage( $query ) {
        if ( $query->is_home() && $query->is_main_query() ) {
            $query->set( 'cat', 2362 );
        }
    }
    add_action( 'pre_get_posts', 'filter_cat_homepage' );

    It will then display all the posts assigned for category 2362. You may change the value of 2362 with the Id of your preferred category.

    Thanks!

    #1215664
    Pollito69
    Participant

    Thanks. I have existing category called “BlogArticle” that I use for the post that should display in the Blog page but not in the Home page – please see the attachment.
    So I added the below in my Child theme’s functions.php:

    function filter_cat_homepage( $query ) {
    if ( $query->is_home() && $query->is_main_query() ) {
    $query->set( ‘cat’, BlogArticle );
    }
    }
    add_action( ‘pre_get_posts’, ‘filter_cat_homepage’ );

    After saving the changes, I see that the post with “BlogArticle” is still on the Home page – please see the attached.

    Just to be sure I explained this right: I want to remove all posts with “BlogArticle” category from my Home page, and only display them on my “The Blog” page.

    What am I missing?
    Thank you.

    #1215797
    Rue Nel
    Moderator

    Hello There,

    Thanks for the updates! The code should contain the category ID. Please update it and use this instead:

    function filter_cat_homepage( $query ) {
        if ( $query->is_home() && $query->is_main_query() ) {
            $query->set( 'cat', '-2362' );
        }
    }
    add_action( 'pre_get_posts', 'filter_cat_homepage' );

    There is a slight difference with the first code we gave. You will noticed that the ID is negative which would mean that this category will be excluded from your query. For further details, please check out the codex: https://codex.wordpress.org/Plugin_API/Action_Reference/pre_get_posts

    Hope this helps.

  • <script> jQuery(function($){ $("#no-reply-1204326 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>