Can't Implement in Quark Theme
-
Hello! I am trying to implement this in the Quark Theme. It doesn’t seem to be working. Here is the orignal code below this message. I am fairly new to this so I may be missing something simple. I have a child theme and a functions.php setup in my child theme folder. I then pasted the below code into my new functions.php file and then attempted to paste in your code,
if(function_exists(‘wp_paginate’)) {
wp_paginate();
}but can’t quite seem to make it work. Please advise.
Thanks!
Russif ( ! function_exists( ‘quark_content_nav’ ) ) {
function quark_content_nav( $nav_id ) {
global $wp_query;
$big = 999999999; // need an unlikely integer$nav_class = ‘site-navigation paging-navigation’;
if ( is_single() ) {
$nav_class = ‘site-navigation post-navigation nav-single’;
}
?>
<nav role=”navigation” id=”<?php echo $nav_id; ?>” class=”<?php echo $nav_class; ?>”>
<h3 class=”assistive-text”><?php _e( ‘Post navigation’, ‘quark’ ); ?></h3><?php if ( is_single() ) { // navigation links for single posts ?>
<?php previous_post_link( ‘<div class=”nav-previous”>%link</div>’, ‘<span class=”meta-nav”>’ . _x( ‘<i class=”icon-angle-left”></i>’, ‘Previous post link’, ‘quark’ ) . ‘</span> %title’ ); ?>
<?php next_post_link( ‘<div class=”nav-next”>%link</div>’, ‘%title <span class=”meta-nav”>’ . _x( ‘<i class=”icon-angle-right”></i>’, ‘Next post link’, ‘quark’ ) . ‘</span>’ ); ?><?php }
elseif ( $wp_query->max_num_pages > 1 && ( is_home() || is_archive() || is_search() ) ) { // navigation links for home, archive, and search pages ?><?php echo paginate_links( array(
‘base’ => str_replace( $big, ‘%#%’, esc_url( get_pagenum_link( $big ) ) ),
‘format’ => ‘?paged=%#%’,
‘current’ => max( 1, get_query_var( ‘paged’ ) ),
‘total’ => $wp_query->max_num_pages,
‘type’ => ‘list’,
‘prev_text’ => __( ‘<i class=”icon-angle-left”></i>Previous’ ),
‘next_text’ => __( ‘Next<i class=”icon-angle-right”></i>’ )
) ); ?><?php } ?>
</nav><!– #<?php echo $nav_id; ?> –>
<?php
}
}
- The topic ‘Can't Implement in Quark Theme’ is closed to new replies.