• Resolved MarialKa

    (@marialka)


    Hi. Tried to set-up (single) post pagination “Previous” and “Next” links in same category using theme function.php file but without success

    Please, could you share an example snippet? Many thanks in advance

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @marialka,

    Try the following snippet

    add_filter( 'astra_single_post_navigation', 'ast_post_navigation' );
    function ast_post_navigation () {
    	$arr = array(
    		'next_text' => '%title',
    		'prev_text' => '%title',
    		'in_same_term' => true,
    	);
        return $arr;
    }

    FYI, we don’t offer support when it comes to customization and/or custom code. If the snippet above doesn’t work, I will leave this to the community. Hope someone will share an insight about it.

    Kind regards,
    Herman ??

    Thread Starter MarialKa

    (@marialka)

    Great… many thanks @bsfherman to share this custom snippet

    For now I should find by myself ?? how to add arrow.

    PS: do you know if a pagination option (same category or all posts) is inclued in the dashboard customizer of premium version ?

    Thread Starter MarialKa

    (@marialka)

    Missed ?? this “mark as resolved”

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Single Post Pagination in same category? only’ is closed to new replies.