Ok Sakin for copy catchbox content nav in child theme but after ?
I suppose I must change some lines, no ?
Can you tell me, please, what to do after ?
This is “content nav function” I’ve had copy :
if ( ! function_exists( ‘catchbox_content_nav’ ) ) :
/**
* Display navigation to next/previous pages when applicable
*/
function catchbox_content_nav( $nav_id ) {
global $wp_query;
/**
* Check Jetpack Infinite Scroll
* if it’s active then disable pagination
*/
if ( class_exists( ‘Jetpack’, false ) ) {
$jetpack_active_modules = get_option(‘jetpack_active_modules’);
if ( $jetpack_active_modules && in_array( ‘infinite-scroll’, $jetpack_active_modules ) ) {
return false;
}
}
if ( $wp_query->max_num_pages > 1 ) { ?>
<nav id=”<?php echo $nav_id; ?>”>
<h3 class=”assistive-text”><?php _e( ‘Post navigation’, ‘catchbox’ ); ?></h3>
<?php if ( function_exists(‘wp_pagenavi’ ) ) {
wp_pagenavi();
}
elseif ( function_exists(‘wp_page_numbers’ ) ) {
wp_page_numbers();
}
else { ?>
<div class=”nav-previous”><?php next_posts_link( __( ‘<span class=”meta-nav”>←</span> Older posts’, ‘catchbox’ ) ); ?></div>
<div class=”nav-next”><?php previous_posts_link( __( ‘Newer posts <span class=”meta-nav”>→</span>’, ‘catchbox’ ) ); ?></div>
<?php
} ?>
</nav><!– #nav –>
<?php
}
}
endif; // catchbox_content_nav
if ( ! function_exists( ‘catchbox_content_query_nav’ ) ) :
/**
* Display navigation to next/previous pages when applicable
*/
function catchbox_content_query_nav( $nav_id ) {
global $wp_query;
if ( $wp_query->max_num_pages > 1 ) { ?>
<nav id=”<?php echo $nav_id; ?>”>
<h3 class=”assistive-text”><?php _e( ‘Post navigation’, ‘catchbox’ ); ?></h3>
<?php if ( function_exists(‘wp_pagenavi’ ) ) {
wp_pagenavi();
}
elseif ( function_exists(‘wp_page_numbers’ ) ) {
wp_page_numbers();
}
else { ?>
<div class=”nav-previous”><?php next_posts_link( __( ‘<span class=”meta-nav”>←</span> Older posts’, ‘catchbox’ ) ); ?></div>
<div class=”nav-next”><?php previous_posts_link( __( ‘Newer posts <span class=”meta-nav”>→</span>’, ‘catchbox’ ) ); ?></div>
<?php
} ?>
</nav><!– #nav –>
<?php
}
}
endif; // catchbox_content_nav