WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Custom text on Index Page (6 posts)

  1. breger
    Member
    Posted 8 years ago #

    I had this working before on WP 1.5 but it doesn't seem to work properly in WP 2.0 I am trying to add a chunk of text before the comments section I used for WP 1.5
    Index Page only, but seem to get errors when I have added the query string

    <?php if(empty($_SERVER['QUERY_STRING'])) { ?>

    The URL is : http://www.airdrie.net/weblog2

  2. ifelse
    Member
    Posted 8 years ago #

    Use:
    <?php if(is_home()) {?>
    instead of
    <?php if(empty($_SERVER['QUERY_STRING'])) { ?>

  3. breger
    Member
    Posted 8 years ago #

    Hi ifelse. I tried adding this instead but it threw up an error - Parse error: parse error, unexpected $ in /home/airdrie/public_html/weblog2/wp-content/themes/notebook/index.php on line 72

    I don't know where the $ is coming from.

  4. ifelse
    Member
    Posted 8 years ago #

    Can you upload the file that you're editing to http://www.pastebin.ca/ (and provide the link)? There's probably just a bracket missing somewhere.

  5. breger
    Member
    Posted 8 years ago #

    Problem solved - I should have known it was simple! I just created a "home.php" page and added the custom text to this page then deleted the same text from the "index.php" page.

  6. breger
    Member
    Posted 8 years ago #

    Thanks for your help ifelse.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags