WordPress.org

Ready to get started?Download WordPress

Forums

"if (is_single())" doesn't work (for me) (2 posts)

  1. Saiyajin
    Member
    Posted 2 years ago #

    hi,

    i want to add advertisement to my posts. When i use <?php if (is_single()) { ?> the advertisements are shown at the home page also, but they should only be in single.php ...

    whats wrong?

    (Sorry for my bad english ^^, but the german support won't help me...)

    Saiyajin

  2. egado
    Member
    Posted 2 years ago #

    Hmm... if you only want to show them in your single post view, forget about the conditional tag if (is_single()) just put it as it is your single.php :)

    But if you tried to use it in your header.php or index.php I will need more of the code for finding the fault ;)

    --
    <ger> Dein Englisch ist voll in Ordnung :) </ger>

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.