Can't get this to work with twenty twelve
-
Not sure where I’m going wrong?
I’ve created a child theme
/ wp-content / themes / twentytwelve / twentytwelve_child /
And added a functions.php file with the following code
<?php
// WP-PageNavi
function twentytwelve_content_nav( $nav_id ) {
global $wp_query;
if ( $wp_query->max_num_pages > 1 ) : ?>
<?php /* add wp-pagenavi support for posts */ ?>
<?php if(function_exists(‘wp_pagenavi’) ) : ?>
<?php wp_pagenavi(); ?><?php else: ?>
<nav id=”<?php echo $nav_id; ?>”>
<h3 class=”assistive-text”><?php _e( ‘Post navigation’, ‘tto’ ); ?></h3>
<div class=”nav-previous”><?php next_posts_link( __( ‘<span class=”meta-nav”>←</span> Older posts’, ‘tto’ ) ); ?></div>
<div class=”nav-next”><?php previous_posts_link( __( ‘Newer posts <span class=”meta-nav”>←</span>’, ‘tto’ ) ); ?></div>
</nav><!– #nav-above –>
<?php endif; ?>
<?php endif;
}But nothing has changed.
You can see where I’m trying to use it here.
https://jsprints-ink.co.uk/the-building-of-st-pauls-church-birmingham-in-the-1770s/
I’ve been trying to get this to work for days. Any help would be appreciated.
- The topic ‘Can't get this to work with twenty twelve’ is closed to new replies.