Different content on home page versus displaying s (3 posts)

  1. Simon Hampel
    Posted 12 years ago #

    I want to add content outside my blog posts on my home page that is not displayed when a user shows just a single post or performs a search to get a list of blog entries etc etc.
    Basically, I have added some text between the h1 tag and the div id="content" tag in index.php so that it is displayed before we go into the loop to show each blog post.
    But this causes it to also show up when displaying just a single blog post or when searching etc.
    Any way to hide it when not showing the default view ? A php function call that I've missed perhaps ?

  2. bestfoot
    Posted 12 years ago #

    You can probably hard code a conditional into your php. If not x then y in essence. Could help you if you visit me in our chat over at http://htmlfixit.com probably.

  3. chuckg
    Posted 12 years ago #

    It sounds like you're looking to show certain content when you're on the the main index, but not when you're browsing anywhere else. The if statement you're looking for is probably best illustrated here, but applied ina different way:

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.