WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Page displays post instead of page content (3 posts)

  1. brucehere365
    Member
    Posted 2 years ago #

    I currently am having a strange problem where I have basic theme built.
    All posts are displaying fin and the homepage with a list of posts.
    No problems there.
    My current page.php looks like the following:

    <?php get_header(); ?>
    <div id="content">
    
    			  <div id="entry">
    
        <div id="post-content">
        <h1><?php the_title(); ?>.</h1>
    	<?php the_content(); ?>
    
        <!-- end #entry --></div>
    
    		 </div>
             <?php get_sidebar(); ?>
             <?php get_footer(); ?>

    I have an index.php file which has the loop in it (I think)

    <?php if (have_posts()) : ?>
                  <?php while (have_posts()) : the_post(); ?>
    
        <h1><div class="title-category"><a class="bolder" href="<?php the_permalink(); ?>" ><?php the_title(); ?>.&nbsp;</a> <a class="semibold"><?php the_category(); ?></a></div>
         <div class="date"><?php the_time('m.d.Y'); ?></div></h1>
    
        <div id="post-content">
        <?php the_content(); ?>
        <!-- bottom share area -->
        <div class="title-category"><iframe src="http://www.facebook.com/plugins/like.php?href=<?php the_permalink() ?>&show_faces=false&colorscheme=light"
            scrolling="no" frameborder="0"
            style="border:none; width:400px; height:30px"></iframe>  <a class="semibold"></a></div>
         <div class="social">
    <div id="custom-tweet-button">
    
          <a href="https://twitter.com/share" class="twitter-share-button" data-url="<?php the_permalink() ?>" data-count="none">Tweet</a><script type="text/javascript" src="//platform.twitter.com/widgets.js"></script>
    
        </div>
    
    </a><div id="comm"><a class="bolder" href="<?php the_permalink(); ?>#comments" >Comment</a><?php comments_number('(0)','(1)','(%)'); ?></div></div>
         <br /><br />
     <?php //echo do_shortcode("[fb_like]"); ?>
        <div class="hr"></div>
        <!-- end #entry --></div>
    
        <?php endwhile; ?>
       	 <?php endif; ?>

    I am not really sure where it's going wrong? Some help would be appreciated.
    Site is http://www.anthonyleemartin.com
    and more specifically an example page is http://anthonyleemartin.com/about/

  2. Jose Castaneda
    Member
    Posted 2 years ago #

    Um, you may want to check because I keep getting an error on my end. Tells me: Parse error: syntax error, unexpected $end in /home/huemanwr/public_html/alm/wp-content/themes/alm_theme/header.php on line 173

  3. brucehere365
    Member
    Posted 2 years ago #

    Look like i was missing
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    from the top of the page.php file ;)

Topic Closed

This topic has been closed to new replies.

About this Topic