Tough 1 - Static Content on only Home Page of Blog

Discussion in 'Blogging' started by HighRollerT, Jul 29, 2010.

  1. #1
    I need a way to keep my blog post appearing on the home page but also to add some static text at the bottom. And I do not want it in the footer.
    HOw do I do this? Edit the mainindex.php
     
    HighRollerT, Jul 29, 2010 IP
  2. internetmarketingiq

    internetmarketingiq Well-Known Member

    Messages:
    3,552
    Likes Received:
    70
    Best Answers:
    0
    Trophy Points:
    165
    #2
    Set a page as the home page in the WP Admin. Then use WP Sticky plugin and set it to announcement. This puts a single post always at the top and in most templates this will keep that post from moving off the front page.

    There are a lot of ways to set up static content in WordPress.
     
    internetmarketingiq, Jul 30, 2010 IP
  3. HighRollerT

    HighRollerT Guest

    Messages:
    235
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Well I really want to keep it as simple as possible. I want the home page to function as a normal wordpress blog would just with a chunk of text at the bottom above the footer.

    Can I enter text straight into mainindex.php in the editor portion of the back end?
     
    HighRollerT, Aug 1, 2010 IP
  4. mcfox

    mcfox Wind Maker

    Messages:
    7,526
    Likes Received:
    716
    Best Answers:
    0
    Trophy Points:
    360
    #4
    Use a php include where you want the text to appear. So you would edit the index.php in your template, not the root index.php.

    <?php include('yourpage.any') ?>
    PHP:
    Obviously, don't forget to create the include page and remember to set the path. The example I've given shows the path if the include page was in 'root' but if you want to put it anywhere else you would need to set the path:

    e.g.
    <?php include('/newfolder/yourpage.any') ?>
    PHP:
    or

    <?php include('wp-content/themes/yourtheme/yourpage.any') ?>
    PHP:
     
    mcfox, Aug 2, 2010 IP