Skip to content Skip to sidebar Skip to footer

WordPress wp navigation not working in thesis theme

Reading Time: < 1 minute

How to add, where can I add wp navigation plugin script into the wordpress thesis theme. This is a common problem.Simply you can use thesis_hook_after_content thesis hook functions to put this.
1- Add the following function into your custom_functions.php. You can find it /wp-content/themes/thesis/custom/custom_functions.php

function thesis_page_navi() { ?>
    <div id="pagenavi">
      <div class="wp-pagenavi">
        <?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?>
      </div>
    </div>
<? }
add_action('thesis_hook_after_content', 'thesis_page_navi');

 

2- Add the following css styles to your stylesheet.

#pagenavi {
  margin: 0 20px;
  font-size: 18px;
  padding: 10px 20px;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}
.wp-pagenavi {
  float: left;
}
.wp-pagenavi a {
  margin: 0 5px;
  padding: 3px 10px;
}
.wp-pagenavi a:hover {
  background: #fff;
  box-shadow: 0 0 8px #ccc inset;
}
.wp-pagenavi span.pages {
  margin: 0 5px;
}
.wp-pagenavi span.current {
  margin: 0 5px;
  padding: 3px 10px;
  background: #fff;
  box-shadow: 0 0 8px #ccc inset;
}