• Resolved kenwinstoncaine

    (@kenwinstoncaine)


    Hi:

    The following page.php file (example 1) only brings up a blank page when I create a new page.

    The following following page.php file (example 2) brings in the template, but only allows one post to a Page.

    Can you see what is broken in the code in example 1 so that I can get it working?

    Very appreciative,
    ken

    example 1 — the broken page.php file

    <?php get_header(); ?>

    <div id=”content”>

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

    <div class=”post”>
    <h1 id=”post-<?php the_ID(); ?>”><?php the_title(); ?></h1>
    <div class=”entrytext”>
    <?php the_content(‘<p class=”serif”>Read the rest of this page ?’); ?>

    <?php link_pages(‘Pages: ‘, ”, ‘number’); ?>

    </div>
    </div>

    <?php endwhile; endif; ?>
    <?php edit_post_link(‘Edit this entry.’, ”, ”); ?>

    </div>

    <?php endwhile; ?>

    <div class=”navigation”>
    <div class=”alignleft”><?php next_posts_link(‘? Previous Entries’) ?></div>
    <div class=”alignright”><?php previous_posts_link(‘Next Entries ?’) ?></div>
    </div>

    <?php endif; ?>

    </div>

    </div>

    <?php get_sidebar(); ?>

    <?php get_footer(); ?>

    *******
    *******

    example 2 – the current page.php file (1-13-06)

    <?php get_header(); ?>

    <div id=”content”>

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

    <div class=”post”>
    <h1 id=”post-<?php the_ID(); ?>”><?php the_title(); ?></h1>
    <div class=”entrytext”>
    <?php the_content(‘<p class=”serif”>Read the rest of this page ?’); ?>

    <?php link_pages(‘Pages: ‘, ”, ‘number’); ?>

    </div>
    </div>

    <?php endwhile; endif; ?>
    <?php edit_post_link(‘Edit this entry.’, ”, ”); ?>

    </div>

    </div>

    <?php get_sidebar(); ?>

    <?php get_footer(); ?>

Viewing 2 replies - 1 through 2 (of 2 total)
  • Don’t post long code here, please!
    It is difficult to read and nobody really bothers to take a look at it. You can use https://pastebin.com or similar services – and post back with the URI.
    For posting small code snippets, please read carefully the instructions here below the text input area: the “backticks” usually are located on top-left of your keyboard, where ~ [tilde] is.

    Edit. And, please, don’t use “chat” abbreviations in your posts or title – for non-native speakers and those who expect “normal” language it is difficult to understand!

    Thread Starter kenwinstoncaine

    (@kenwinstoncaine)

    Gotcha. I was trying to make the headline shorter.

    I’m at pastebin.com right now. Going to figure out what that is about and then will post a new request.

    Thanks,
    kwc

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Do U C Y this page.php file won’t pull in theme?’ is closed to new replies.