• I am trying to getting going with my customization of my personal wordpress blog, but i hit this problem.

    I have merged custom post types and list them on my home page with paging option.

    $paged = 1;
        if ( get_query_var( 'paged' ) ) { $paged = get_query_var( 'paged' ); }
        if ( get_query_var( 'page' ) ) { $paged = get_query_var( 'page' ); }
        $paged = intval( $paged );
    
        if ($paged <= 1) {
        global $post;
    
        $args = array(
        'post_type' => array( 'post', 'recipe'),
        'post_status' => 'publish',
        'posts_per_page' => 10,
        'orderby' => $orderby,
        'order' => $order,
        'page' => $paged,
        'paged' => $paged,
        'offset' => $offset
    
        query_posts($args);
    
        ob_start();
    
        $query = new WP_Query( $args );

    After this I iterate through and render the posts.

    I am currently using woothemes and all there methods like these

    woo_loop_after();
    woo_pagenav();
    wp_reset_query();

    I have looked through and still can’t firgure out why this code works perfectly when i am logged in and redirects to the homepage for none logged in users.

    HELP!

  • The topic ‘Pagination redirects to home page when logged out works perfect when logged in’ is closed to new replies.