• Anonymous User 13423376

    (@anonymized-13423376)


    I ran into the following oddity and maybe someone is able to give me an explaining hand. I have a front-page (front-page.php) and a home.php containing news aka blog posts.

    In “settings – reading settings – front page displays” i’ve set the radio button to “a static page” with “front-page” the front-page.php template and the “posts page” with the home.php template. In the beginning i’ve used the standard “posts” post type in the wp-admin interface to post blog posts.

    Due to the switch to picturefill for the responsive image usage and the need to show a responsive thumbnail on the front-page linking to home.php I’ve just dropped the standard posts type and created a custom post type with Custom Post Type UI and Advanced Custom Fields plugins. All works fine – the blog posts and all the uploaded images related to each post type are shown on the front-page as well as the home.php as expected. But one thing I don’t understand. As soon as I delete ALL “posts” in the standard posts type all of a sudden the WP_Query for the “news” custom post type is unable to query any post at all?! I have 4 posts in the “news” custom post type.

    Scenario 1)
    1 post in standard post type and 4 in “news” custom post type => home.php displays the 4 posts

    Scenario 2)
    0 posts in the standard post type and 4 in the “news” custom post type => home.php displays 0 posts

    => if i change within the reading settings the “posts page” to -select- the home.php is showing the 4 posts again even there aren’t any posts in the standard post type. Is that an intended behaviour and is the way to set the posts page to -select- the right way to deal with it? I am still a little bit confused. Thanks Ralf

  • The topic ‘Why do i need at least one active post even if i don't use the standard posts’ is closed to new replies.