WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Posts in all pages help (2 posts)

  1. johnjf
    Member
    Posted 2 years ago #

    Hello I'm having a problem with posts showing up in all my pages.
    I had this problem earlier and thought I fixed it but then noticed it wasn't fixed after all. I figured out what's doing the problem, my home page is working fine and showing the blog posts like I want it to but when I make a page with content it shows a blog post instead of the pages content.

    The problem is my banner area where I have an editable area with a welcome message and slider images beside it. When I remove this section the page content shows up. Here is the code

    <div id="banner">
            	<div id="welcome">
    	<? query_posts('category_name=editable'); ?>
    	<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    		<h1><?php the_title(); ?></h1>
    		<p><?php the_content( __('Read the rest of this page ยป', 'template')); ?></p>
    	<?php endwhile; endif; ?>
    
                	</div><!----- End Of Welcome ----->
    
                <div id="slider">
    	<?php echo do_shortcode('[thethe-image-slider name="images"]'); ?>
                </div><!----- End Of Slider ----->
    
            </div><!------- End Of Banner -------->

    what is the problem and what may the fix be?

    Thank you

  2. johnjf
    Member
    Posted 2 years ago #

    nvm, just realized I had multiple loops and needed

    wp_reset_query();

    to start my other loop

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.