WordPress.org

Ready to get started?Download WordPress

Forums

How to display title and content on static homepage? (2 posts)

  1. Matthew Fries
    Member
    Posted 4 years ago #

    I just created a static homepage for my site - just a splash page. I'm using a different template for this page which is basically the same as the default (index.php) template. For some reason I can't seem to get the new template/page to display the page content (the content displays fine if I use the default index.php template).

    I'm requesting the content in a very basic way using the_content() exactly as it was in the index.php template - but it shows nothing when I designate my new template for a page.

    I read something somewhere about needing a loop to use the_content(), but there doesn't seem to be a loop in the index.php template anywhere - it also just uses a simple the_content() request. Is there something happening differently with the index.php template?

    Where did I go wrong???

  2. esmi
    Forum Moderator
    Posted 4 years ago #

    Every post, archive and page template file uses the Loop. If you don't have a Loop, nothing will be displayed in the content area.

    http://codex.wordpress.org/The_Loop

Topic Closed

This topic has been closed to new replies.

About this Topic