WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Stuff appearing multiple times on static pages. (6 posts)

  1. anth-net
    Member
    Posted 6 years ago #

    Something very weird is happening on my static pages. I'm working on editting a new theme for my wordpress but on one page, the stuff is appearing twice and on another, it's appearing three times. Here is a look at the code i'm using for the static page...

    <?php require('wp-blog-header.php'); ?>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head profile="http://gmpg.org/xfn/11">
    	<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
    <title><?php bloginfo('name'); ?>
     <?php if ( is_single() ) { ?> &raquo; Blog Archive <?php } ?>
     <?php wp_title(); ?></title>
    
    	<?php wp_head(); ?>
    </head>
    <body>
    
    <?php get_header(); ?>
    
    <div class="narrow_column">
    
    <?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?>
    
    <div class="post" id="post-<?php the_ID(); ?>">
    
    	<div class="entry">
    
    *****PAGE CONTENT HERE*****
    
    	</div>
    
    </div>
    
    <?php endwhile; ?>
    
    <?php include (TEMPLATEPATH . '/browse.php'); ?>
    
    <?php else : ?>
    
    <?php endif; ?>
    
    			</div>
    
    <?php get_footer(); ?>
    
    </body>
    
    </html>

    does anyone know the problem. If you need to see a page doing it, try going to http://anth-net.com/reviews.php but don't click on any other links because i'm still working on the other pages.

  2. anth-net
    Member
    Posted 6 years ago #

    help?

  3. moshu
    Member
    Posted 6 years ago #

    In WP we call "static Pages" those that you create in admin > Write > Write Page.

    What you posted above seems to be something outside of WP. So, without getting technical (because I am not a coder), explain in plain English what are you trying to do. Describe the desired end result, not the how-to...

  4. anth-net
    Member
    Posted 6 years ago #

    Oh ok. Then I guess forget the part about "static."

    Basically, I just want to use my WP theme on other pages I have created (not static pages but outside pages). I've done it before with my old theme and it worked fine, but this one repeats the stuff on the pages multiple times for no apparent reason that I can tell.

  5. anth-net
    Member
    Posted 6 years ago #

    if you want to see what I mean, use this link instead... http://insiderevolution.net/reviews.php

    ignore the link in the top post.

  6. anth-net
    Member
    Posted 6 years ago #

    I want to thank everyone who helped... which would be no one. I figured it out myself... I had to remove

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

    from the top of the code and

    <?php endwhile; ?>
    
    <?php else : ?>
    
    <?php endif; ?>

    from the bottom of the code.

    Thanks again.

Topic Closed

This topic has been closed to new replies.

About this Topic