WordPress.org

Ready to get started?Download WordPress

Forums

Pagination Error (11 posts)

  1. selcuk33
    Member
    Posted 1 year ago #

    Hi everyone,

    I make pagination with query_posts() function. Firstly, it works on local perfectly. Secondly i upload a web server with fresh new wordpress. But in web server pagination doesn't work magically :) Magically because, it's perfectly generate pagination links(like http://www.example.com/page/2) but if you go http://www.example.com/page/2 wordpress return 404 page. If you go http://www.example.com/page/1 it works perfectly and redirect you to homepage but the other pages like 2 or 3 it doesn't work.

    I copy ftp and database on web server and paste local. In local i have same problem pagination works broken.

    I have post type more than posts.

    I don't understand what's the problem ?

  2. deepbevel
    Member
    Posted 1 year ago #

    I don't see any pagination on any of the links.

    In case this applies:
    I've found when using query posts with pagination, I have to set my posts per page in wp to the same or greater number as the posts per page in the query posts args. otherwise it doesn't show all the posts.

  3. selcuk33
    Member
    Posted 1 year ago #

    deepbevel sorry but i can't understand you. i write example.com links just for the example... not mine... the problem not in example.com

  4. deepbevel
    Member
    Posted 1 year ago #

    then, it is I who doesn't understand. Sorry!

  5. selcuk33
    Member
    Posted 1 year ago #

    Update : i think custom post type cause this problem. This is my paginated query ;

    <?php
     $pagedd = (get_query_var('paged')) ? get_query_var('paged') : 1;
     query_posts(array('post_type'=>array('post','posttype2','posttype3'),'paged'=>$pagedd));
     if(have_posts()): while(have_posts()): the_post();
    ?>
    <li>
    ...
    </li>
    <?php endwhile; ?>
    <?php endif; ?>

    is wrong anything ?

  6. deepbevel
    Member
    Posted 1 year ago #

    $pagedd

    change to $paged

  7. selcuk33
    Member
    Posted 1 year ago #

    no deepbevel $pagedd is my variable, $pagedd or $paged it doesn't matter. but again i change variable name to $paged nothing happen same problem continue...

  8. deepbevel
    Member
    Posted 1 year ago #

    I'm in the dark, I haven't seen an example of the problem. Are you getting no pagination links? or is there more to it? Can you post a link to a relevant example of the problem?

  9. deepbevel
    Member
    Posted 1 year ago #

  10. selcuk33
    Member
    Posted 1 year ago #

    thanks deepbevel my problem is about custom post type... query_post() function doesn't work with custom post types... i try work with WP_Query :/

  11. deepbevel
    Member
    Posted 1 year ago #

    oooh, so sorry, I confused your thread with another. Keep researching, although it can get complicated, this is standard stuff and the info is out there if you google it long enough. good luck!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.