WordPress.org

Ready to get started?Download WordPress

Forums

Permalinks redirecting pagination (6 posts)

  1. skitter
    Member
    Posted 1 year ago #

    hey guys, can someone help me? here are my problem:
    i have a blog post and a single.php page template, in there i show all of attachments paginated. my pagination links so render: http://mydomain.com/category/postname/page/2 but when i hit it i get back to http://mydomain.com/category/postname.

    it's working the same way for my custom post and other pages pagination, i'm only having issues on single.php page, does anyone can help me? if need i can share the link and pieces of my code.

    thanks

  2. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    Are you setting the $paged variable in your custom query? Eg:

    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    $args= array(
    	[...]
    	'paged' => $paged
    );
    query_posts($args);
  3. skitter
    Member
    Posted 1 year ago #

    yes here are my query:

    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    $args = array(
    	'post_type' => 'attachment',
    	'posts_per_page' => 18,
    	'post_status' => 'any',
    	'post_parent' => $post->ID,
    	'exclude' => get_post_thumbnail_id($post->ID),
    	'orderby' => 'menu_order',
    	'paged' => $paged
    );
    $attachments = new WP_Query( $args );

    the funny thing is that with normal permalinks (id based) it works like a charm.

  4. esmi
    Theme Diva & Forum Moderator
    Posted 1 year ago #

    Check with your hosts that mod_rewrite is running on your server.

  5. skitter
    Member
    Posted 1 year ago #

    yes it is :(

  6. skitter
    Member
    Posted 1 year ago #

    here are the link:

    http://www.compoundent.com/media/grammy-brunch

    if you can take a look and help me @esmi

Topic Closed

This topic has been closed to new replies.

About this Topic