WordPress.org

Forums

Is it possible to.... (8 posts)

  1. WhiteDevil
    Member
    Posted 10 years ago #

    To make my own HTML site and then put the WP PHP code into the files?

  2. James Huff
    Volunteer Moderator
    Posted 10 years ago #

    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.

    http://codex.wordpress.org/The_Loop

  3. WhiteDevil
    Member
    Posted 10 years ago #

    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?

  4. Joshua Sigar
    Member
    Posted 10 years ago #

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

  5. Kafkaesqui

    Posted 10 years ago #

    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.

  6. WhiteDevil
    Member
    Posted 10 years ago #

    http://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.

  7. Kafkaesqui

    Posted 10 years ago #

    Swap the first two code blocks:

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

    <?php get_header(); ?>

  8. WhiteDevil
    Member
    Posted 10 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.