WordPress.org

Forums

Can't get my content to appear in a very simple page template (3 posts)

  1. databell96
    Member
    Posted 1 year ago #

    Weird. I'm basically using a dumbed down page template that only does a couple of things. It should pull the title and content of a page. That's it. No fancy styling as I plan to incorporate this in a dynamic template.

    An example would be here.

    So the only code I'm using for my new page.php template is:

    <h1 id="post_header"><?php the_title(); ?></h1>
    <div class="entry-content"><?php the_content(); ?></div><!-- .entry-content -->

    Like I said, rather simple.

    I tried moving the_content to other spots in the template and I added other items like php the_time('l, F jS, Y'), which did display. So why is the content being ignored? I don't get it.

  2. vtxyzzy
    Member
    Posted 1 year ago #

    Please put the entire code in a pastebin and post a link to it here. This may allow someone to help.

  3. if the posted code is all of the main code, then review https://codex.wordpress.org/The_Loop

Topic Closed

This topic has been closed to new replies.

About this Topic