WordPress.org

Ready to get started?Download WordPress

Forums

nextpage
next page broke pleas help (4 posts)

  1. admin_art
    Member
    Posted 2 years ago #

    Hi
    I am new on wordpress and I tried to change the index code of my theme so I could have multiple pages with posts and since I changed the code there are a few basic options who don't work anymore, like: next page (loads the 1st page every time I click on it), the sticky doesn't work and I can't put a "more" tag in my posts.
    This is the code that I inserted after <?php if (have_posts()) : ?> :

    <?php query_posts('category_name=yourcategory&posts_per_page=x'); ?>

    does anyone know what might be the problem?

    http://wordpress.org/extend/plugins/nextpage/

  2. alchymyth
    The Sweeper & Moderator
    Posted 2 years ago #

    next page (loads the 1st page every time I click on it)next page (loads the 1st page every time I click on it)

    your query is missing the 'paged' parameter (I personally woud add the query before the 'if(have_posts())' ):

    <?php query_posts('category_name=yourcategory&posts_per_page=x&paged='.get_query_var('paged')); ?>
    
    <?php if (have_posts()) : ?> :

    the sticky doesn't work

    you would need to add the query parameters to show the sticky:
    http://codex.wordpress.org/Class_Reference/WP_Query#Sticky_Post_Parameters

    I can't put a "more" tag in my posts.

    see: http://codex.wordpress.org/Customizing_the_Read_More#How_to_use_Read_More_in_Pages

  3. admin_art
    Member
    Posted 2 years ago #

    Thanks for the help this has been bugging me since 3 moths :)

  4. admin_art
    Member
    Posted 2 years ago #

    I have one more question. since I'm a noob at programming and I don't know the first thing about php, I was wondering where to insert the code for the sticky exactly?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags