Title: Problems with embedded wordpress
Last modified: August 19, 2016

---

# Problems with embedded wordpress

 *  [chef1981](https://wordpress.org/support/users/chef1981/)
 * (@chef1981)
 * [17 years ago](https://wordpress.org/support/topic/problems-with-embedded-wordpress/)
 * I’m trying to embedd WordPress in a existing webpage, and have done so without
   any problems using the following loop:
    <?php define(‘WP_USE_THEMES’, false);//
   this disables the WordPress themes require_once(‘wp-blog-header.php’); // be 
   sure to change “./blog” to the correct path! ?>
 * and
 * <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    <!– If the
   post is in the category we want to exclude, we simply pass to the next post. –
   > <?php if (in_category(‘3’)) continue; ?> <div class=”post”> <h2>“><?php the_title();?
   ></h2> <small><?php the_time(‘F jS, Y’); ?></small> <div class=”entry”> <?php
   the_content(); ?> </div> “>Comments to this post <!– forward or backwards –> 
   <?php posts_nav_link(‘separator’, ‘prelabel’, ‘nextlabel’); ?>
 *  </div> <!– closes the first div box –>
 *  <?php endwhile; else: ?>
    <p>Sorry, no posts matched your criteria.</p> <?php
   endif; ?>
 * The posts are presented properly, but if I want to leave a comment I am redirected
   to the default theme! How can I change this so that the comments-box is presented
   with the same layout as the rest of the page?
    Many thanks for all useful tips!

The topic ‘Problems with embedded wordpress’ is closed to new replies.

## Tags

 * [embedded](https://wordpress.org/support/topic-tag/embedded/)
 * [problem](https://wordpress.org/support/topic-tag/problem/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [chef1981](https://wordpress.org/support/users/chef1981/)
 * Last activity: [17 years ago](https://wordpress.org/support/topic/problems-with-embedded-wordpress/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
