• Resolved brunning

    (@brunning)


    maybe there’s a better way to do this, but…

    i’ve set up my index page with the WP blog entries showing in one div, and other stuff in other divs.

    when you click to the permalinked page, comments, etc, the same index page is used to show the full article with comments.

    this is great, but when viewing the full blog entry, i want to hide the “other stuff”.

    is there a way, using wp tags or other php, i can identify when the page is in the permalink/comments state and not show certain content?

    can i check for some variable or something?

    PHP_SELF doesn’t cut it, as it’s always the same file, index.php.

    thanks!

Viewing 1 replies (of 1 total)
  • For the first case (w/ “other stuff”) use a home.php template. WP recognizes it and displays it instead of index.php.
    For the single post view – use a single.php in your theme.
    (Note: Leave the index.php there, it might be used for other purposes > see Template_Hierarchy)

Viewing 1 replies (of 1 total)
  • The topic ‘hiding content on the homepage when viewing full/permalink/comment page’ is closed to new replies.