Support » Themes and Templates » Have custom page template, need help with content

  • Resolved dbarnes1662

    (@dbarnes1662)


    Created MyStuff Page template. Have the header and footer like I want. Am able to write content in the template, but would much rather be able to use the visual/html screen. That way, I can use the MyStuff template for numerous pages instead needing to create a new template for every page.
    Thanks for any help you can give, Diane
    PS: my site is http://www.modernimagemonitor.com

Viewing 4 replies - 1 through 4 (of 4 total)
  • Michael

    (@alchymyth)

    Forum Moderator

    add a loop into the template;

    http://codex.wordpress.org/The_Loop

    minimal code:

    <?php if( have_posts() ) :
    while( have_posts() ) : the_posts();
    the_content();
    endwhile;
    else :
    echo 'nothing found';
    endif; ?>

    I copied and pasted the code you gave into the template. Put it between the get header and get footer tags. Viewed the site. Lost the footer. Tried to write copy on the html screen, but it didn’t make it onto the site.
    Trying to do static pages, not blogs or posts.
    Thanks, DB

    Michael

    (@alchymyth)

    Forum Moderator

    typo ;-(

    the one thing should read: (you could have figured that out by reading the link I posted)

    the_post();

    Trying to do static pages, not blogs or posts.

    you still need the loop.

    Thanks for checking back. Fixed the typo and it seems to be working just like I want. RE: could have figured that out…..
    You’re giving me credit for much more knowledge than I actually have. Fairly new at this. Thanks again for your help! Diane

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Have custom page template, need help with content’ is closed to new replies.