WordPress.org

Forums

Static front page not working (4 posts)

  1. baszer
    Member
    Posted 2 years ago #

    Hello,

    my static frontpage is not working (when in reading set static front a different one)

    in twentyeleven it is working fine. So it is a mistake in my theme. But I have no idea. Thats why I ask you guys. This is my code:

    <div id="content">
    
        <?php if(have_posts()) : ?>
         <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    	   query_posts("paged=$paged"); ?>
            <?php while(have_posts()) : the_post(); ?>
    
                <div id="post-<?php the_ID(); ?>" <?php post_class('post-single'); ?>>

    thanks.

  2. esmi
    Forum Moderator
    Posted 2 years ago #

    Remove:

    <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    	   query_posts("paged=$paged"); ?>
  3. baszer
    Member
    Posted 2 years ago #

    Huh?! I thought I tried this already ;)

    THANKS ESMI!

    (can you tell me what this does?

    <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    	   query_posts("paged=$paged"); ?>
  4. esmi
    Forum Moderator
    Posted 2 years ago #

    It's an incomplete custom query where all you did was ask for the number of pages. In effect, you asked for nothing.
    http://codex.wordpress.org/Function_Reference/query_posts
    http://codex.wordpress.org/Function_Reference/WP_Query

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.