WordPress.org

Ready to get started?Download WordPress

Forums

How to find out that that the main page is open (3 posts)

  1. dragony4444
    Member
    Posted 6 years ago #

    Hi all,
    I handle with little trouble I don't know how to solve it.

    How I recognize that the post or site is open in my blog? Is there any variable which has some value when visitor reads a post (clicked on post and it's now open)?

    I need to write <h1>WELCOME</h1> on main page but when the article is open I don't wish to have that "welcome" there. Is there any if case which can handle that? St like

    if(!is_post()) echo "<h1>WELCOME</h1>";

    Thanx a lot!

  2. Chris_K
    Member
    Posted 6 years ago #

    Have a look at is_home().

    Conditional_Tags has all the conditional tags that you might care to use.

  3. moshu
    Member
    Posted 6 years ago #

    You are overcomplicating it.
    Put the Welcome message inn your index.php template file.
    In a normal theme when seeing only one posts - it's called single post view - then another template file is in use: single.php.

    Don't ask display questions without naming the theme, giving a link to it etc.

Topic Closed

This topic has been closed to new replies.

About this Topic