Filter "beans_next_text_post_navigation_output" fail in CPT


Hi, i have into the my file template archive-my-custom-post.php the filter : // Modify the "Next" post navigation text.

add_filter( 'beans_next_text_post_navigation_output', 'change_next_text_post_navigation' );
function change_next_text_post_navigation( $text ) {
    if ( $post = get_next_post() ) {
        $text = $post->post_title;
    }
    return $text;
}

I need modifify the text in the button next where this paginate, but this fail, someone can help? Very thank advance!! PD. I tried insert the filter and function in my function.php without success.

Write a reply

Login or register to write a reply, it's free!