Anyone got a solution: Show an info text instead of the 404 page for future planned, currently unpublished pages/posts?

[ad_1]

Hi everyone, as the headline said … I’d like to show an info text (could be static HTML via functions.php or so) if a planned post/page URL got opend. I don’t want show the 404.

Thanks.

[ad_2]
2 Comments
  1. Custom Post/Page template with static html. Change template to default when ready to show actual content.

  2. **You could edit the 404.php for this:**

    if ( get_post_status ( $ID ) == ‘future’ ) {
    // your info text
    } else {
    // your 404 code
    }

    And then output the desired content inside the if-statement.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer