• Hello, I could really use some help.

    I created my website ( https://www.easyyoga.nu ) using the Amadeus theme. So far I have just published a few Posts, which automatically ended up on my home page. But now I would also like to start blogging, on a page I created and called Blog.

    Is it possible to publish some Posts on my home page and others on my Blog page??

    I have been trying things and searched on google, but I haven′t found a solution yet. All help will be greatly appreciated!

    Elien

Viewing 13 replies - 1 through 13 (of 13 total)
  • I’d suggest creating a Category called “Blog” and using that as your Blog ‘page’. Then you can exclude the blog category from the homepage by adding this code your theme’s functions.php file (thought it would be better if you added it to a Child Theme’s or your own simple plugin):

    function my_home_page_posts( $query ) {
        if ( ! is_admin() && $query->is_home() && $query->is_main_query() ) {
            $query->set( 'category__not_in', array( get_cat_ID( 'blog' ) ) );
        }
    
        return $query;
    }
    add_action( 'pre_get_posts', 'my_home_page_posts' );

    Thread Starter elien7

    (@elien7)

    Oh dear this sounds complicated lol.. Thank you so much though!

    If I do that, can I post the posts on my page called Blog?

    Sorry I am no expert, it′s already a miracle I created this website by myself ??

    It wouldn’t be a ‘page’ per se. Whenever you create a category it gets a URL that you can go to to view all posts in the category.

    What the code I showed you does is exclude posts in that category from your homepage, effectively creating two separate blog pages.

    Thread Starter elien7

    (@elien7)

    Okay thanks! It sounds like that would solve part of the issue (not having all posts mixed up on the home page).

    But I would like people to be able to go to a page where they can find all of my blog posts. That′s why I had created the Blog page..
    Do you know if that is possible?

    And I already created a Category called Blog and added my first blog post to it. But the Categories are not listed anywhere on my website…

    But I would like people to be able to go to a page where they can find all of my blog posts.

    That’s what the category page will be.

    And I already created a Category called Blog and added my first blog post to it. But the Categories are not listed anywhere on my website…

    There’s a couple of options. Firstly there’s a Categories widget that you can add to a sidebar/footer. Go to Appearance > Widgets to see that.

    You can also add Categories to menus in Appearance > Menus.

    Thread Starter elien7

    (@elien7)

    Awesome! Thank you ?? That was super easy! Issue solved.

    Thanks a lot to the both of you and have a great day!!
    Elien

    Thread Starter elien7

    (@elien7)

    Oops, just realized it’s not resolved yet… Because now my first blog entry is also on the Home page. It only has to appear on the Blog page.
    Any tips?

    Thread Starter elien7

    (@elien7)

    Jacob, I guess that’s what you were trying to explain to me earlier, but I just don’t understand how to do those things. For example I don’t even know where to find the .php files and how to change stuff…

    Thread Starter elien7

    (@elien7)

    Ok so I managed to find and open the functions.php file and add the script (just copy-pasted it at the end…). Nothing seems to have changed. Maybe I did something wrong?

    Is the post you want on your blog page in the Blog category? The checkbox should be checked next to “Blog” in the Categories panel on the right side of the edit post screen.

    Thread Starter elien7

    (@elien7)

    Yes, it is. It is on my Blog page but also on my home page…

    Thread Starter elien7

    (@elien7)

    So did I skip any step? Or is normally just pasting the code in the functions.php file enough?

    Hello wordpress team, I nead really some help.

    I created my website ( https://www.bestonereviews.com/) using skt themes and created it by myself.

    The problem is iam trying to post in specific pages my posts… its only shows categorys only!!
    ok!! iam trying posts by category.. after publishing my post link is shows like
    https://www.bestonereviews.com/category/post_link/ ” !! but i dont want to post by category… i want to post by page like ” https://www.bestonereviews.com/post_link/ “!! i am new to wordpress. and its really mirracle that iam creating site by myself!! ^_^

    I have been trying things and searched on google, but I haven′t found a solution yet. All help will be greatly appreciated!

    please solve my problem!!

    Thank you ??

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘How to publish Posts on different Pages?’ is closed to new replies.