I currently have the navigation for autofocus pro with the big arrows on each side and the browse at the bottom. I would like to remove the arrows and the BROWSE all together and just put text that says " Previous Post | Next Post " under the post content text.
Daniele Raimondi answers:
Open single.php
To remove the big arrows delete/comment from line 7 to line 10
To remove The browse section and display only prev/next links, just open single.php and change lines from 52 (<div id="nav-below" class="navigation">) to line 82 (</div><!-- #nav-below -->) as below.
<div id="nav-below" class="navigation">
<?php
$previouspost = get_previous_post($in_same_cat, $excluded_categories);
if ($previouspost != null) {
echo '<div class="nav-previous">';
previous_post_link('Older: %link');
echo '</div>';
} ?>
<?php
$nextpost = get_next_post($in_same_cat, $excluded_categories);
if ($nextpost != null) {
echo '<div class="nav-next">';
next_post_link('Newer: %link');
echo '</div>';
} ?>
</div><!-- #nav-below -->
Ivaylo Draganov answers:
Hello,
put this in your functions.php:
function my_custom_init() {
// remove AutoFocus+ navigation
remove_action('thematic_navigation_above', 'autofocus_nav_above', 2);
remove_action('thematic_navigation_below', 'autofocus_nav_below', 2);
}
add_action('init', 'my_custom_init');
// add custom navigation links below single post
function my_custom_navigation() {
if (is_single()) {
?>
<?php previous_post_link(); ?> • <?php next_post_link(); ?>
<?php
}
}
add_action('thematic_navigation_below', 'my_custom_navigation', 2);
You can further customize the link text. By default it shows the post title as link text. Let me know if you need help with that.
Ivaylo Draganov comments:
Actually, here is the updated code with links reading "Previous Post | Next Post". Replace the second function with this:
// add custom navigation links below single post
function my_custom_navigation() {
if (is_single()) {
?>
<?php previous_post_link('%link', 'Previous Post'); ?> |
<?php next_post_link('%link', 'Next Post'); ?>
<?php
}
}
queenb comments:
Can this be moved so it is on the right instead of the bottom left side of the pic?