removing posts_nav_link

Community Forums Forums General Discussion removing posts_nav_link

This topic is: not resolved

This topic contains 3 replies, has 2 voices, and was last updated by  jjaycallejas 1 year, 2 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #60767

    jjaycallejas
    Participant
    Post count: 15

    Hi,

    I’m having trouble with this,

    custom_query() {
    
        global $posts;
    
             $args = (array(
                'category__not_in' => '4',
                'order' => 'desc',
                'order_by'=> 'title',
                'paged' => $paged,
                'posts_per_page' => 4
            ));
        genesis_custom_loop( $args );
    
    }

    Basically, when I pop that query into the page, it throws in a “Next Page” link at the end. I’m not sure how to target it and alter it or remove it altogether. Any help? Is there function I can remove? What hook would it be under? Currently, I have that query running like

    `add_action( ‘genesis_after_loop’, ‘custom_query’ );’

    The add action is placed in front-page.php and my reading is set to static page.

    • This topic was modified 1 year, 2 months ago by  jjaycallejas.
    • This topic was modified 1 year, 2 months ago by  jjaycallejas.
    http://twentyhearts.com
    #60834

    UT Mod
    Participant
    Post count: 160

    I believe removing this -> ‘paged’ => $paged,
    will do the trick, if I understand your question right!

    #60897

    jjaycallejas
    Participant
    Post count: 15

    Thanks vajrasar, but it doesn’t seem to work. I’ve removed that part of the $args and I’m still seeing next page. http://twentyhearts.com/

    One thing to note though, is that the “Next Page” link seems to be ‘disabled’ and relegated to a ‘refresh’ button. When you click it (whether I have the argument ‘paged => $paged’ in there or not, it doesn’t load the next page of posts, only refreshing the page, even though the url says twentyhearts.com/page/2/.

    This place seems to reference my issue, but there isn’t a solution http://stackoverflow.com/questions/8834130/wordpress-disable-pagination-and-limit-number-of-posts

    Is there an action for removing the next page link altogether, or altering it? Ideally, I’d want that link lead to the overall archive page for that custom query.

    #61667

    jjaycallejas
    Participant
    Post count: 15

    Resolved via studiopress support.

    ‘remove_action( ‘genesis_after_endwhile’,’genesis_posts_nav’ );’

    Thanks!

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.