WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] WordPress posts showing up in all pages, why?

[Resolved] WordPress posts showing up in all pages, why?

  • I was just going through the theme I’m building and noticed that the pages I made aren’t showing the content posted in that page, all that shows up are the posts that are created. How come it’s doing this and how do I get the content from the page to show up instead of the posts?

Viewing 5 replies - 1 through 5 (of 5 total)
  • How come it’s doing this

    you might know best – as you haven’t given any info for anybody else to check this.

    check ‘the loop’ and any query before the loop;
    or create a page.php without any custom query before the loop.

    http://codex.wordpress.org/Theme_Development
    http://codex.wordpress.org/The_Loop
    http://codex.wordpress.org/Template_Hierarchy

    I’m using localhost xampp to work on my theme. I’m following a tutorial from amberwienburg using her hyjinks template.

    I have this in my index.php

    <?php query_posts('pagename=Home'); if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
        	<div id="content_main">
    		<h2><?php the_title();?></h2>
    		<?php the_content();?>

    and in my page.php file I just have

    <?php if (have_posts()) ; ?>
    
    	<?php while (have_posts()) : the_post(); ?>
            <div id="content_wrap">
    
        	<div id="content_main">
    		<h2><?php the_title();?></h2>
    		<?php the_content(); ?>

    Sorry I’m new to wordpress.

    Well I’ve been trying to figure out the problem going back and forth editing page.php and index.php, checking my header, etc. I can’t seem to find the problem.

    I took away query_posts('pagename=Home');

    edited what ever else and still all I’m getting is recent posts showing up in my pages instead of content pages.

    found out the error myself

    Why don’t you explain what you did so you can help others out who may have the same issue?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] WordPress posts showing up in all pages, why?’ is closed to new replies.
Skip to toolbar