Viewing 7 replies - 1 through 7 (of 7 total)
  • Moderator James Huff

    (@macmanx)

    Yep. The Loop is the code which display’s WP’s posts. Just stick it exactly where you want your posts to appear on your current design.

    https://codex.www.ads-software.com/The_Loop

    Thread Starter WhiteDevil

    (@whitedevil)

    I do that but I just keep getting these fatel errors.

    Should I put the get header line at the top of my page then put the opening <html> underneath?

    Just look at page.php included with Default Theme. That’s your sample case.

    WhiteDevil: Yes, make sure to include wp-blog-header.php:

    <?php
    define('WP_USE_THEMES', false);
    require('./wp-blog-header.php');
    ?>

    Just make sure the path to it is correct.

    Thread Starter WhiteDevil

    (@whitedevil)

    https://sean.freesuperhost.com/test.php

    I’m still getting the error, heres the script….

    <?php get_header(); ?>

    <?php
    define(‘WP_USE_THEMES’, false);
    require(‘./wp-blog-header.php’);
    ?>

    <div id=”content” class=”narrowcolumn”>

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div class=”post”>
    <h2 id=”post-<?php the_ID(); ?>”><?php the_title(); ?></h2>
    <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 get_sidebar(); ?>

    <?php get_footer(); ?>

    <html>
    <head>
    </head>
    <body>
    <table align=”center”>
    <?php if (have_posts()) : ?>

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

    <div class=”post”>
    <h2 id=”post-<?php the_ID(); ?>”>” rel=”bookmark” title=”Permanent Link to <?php the_title(); ?>”><?php the_title(); ?></h2>
    <small><?php the_time(‘F jS, Y’) ?> <!– by <?php the_author() ?> –></small>

    <div class=”entry”>
    <?php the_content(‘Read the rest of this entry »’); ?>
    </div>

    <p class=”postmetadata”>Posted in <?php the_category(‘, ‘) ?> | <?php edit_post_link(‘Edit’,”,’|‘); ?> <?php comments_popup_link(‘No Comments »’, ‘1 Comment »’, ‘% Comments »’); ?>

    <!–
    <?php trackback_rdf(); ?>
    –>
    </div>

    <?php endwhile; ?>

    <div class=”navigation”>
    <div class=”alignleft”><?php posts_nav_link(”,”,’« Previous Entries’) ?></div>
    <div class=”alignright”><?php posts_nav_link(”,’Next Entries »’,”) ?></div>
    </div>

    <?php else : ?>

    <h2 class=”center”>Not Found</h2>
    <p class=”center”><?php _e(“Sorry, but you are looking for something that isn’t here.”); ?>
    <?php include (TEMPLATEPATH . “/searchform.php”); ?>

    <?php endif; ?>

    </table>

    </body>
    </html>

    I got the PHP from the page.php like you said.

    Swap the first two code blocks:

    <?php
    define('WP_USE_THEMES', false);
    require('./wp-blog-header.php');
    ?>

    <?php get_header(); ?>

    Thread Starter WhiteDevil

    (@whitedevil)

    Thanks, I think I get it now. I’ll carry on editing it tomorrow.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Is it possible to….’ is closed to new replies.