ThemeShaper Forums » Thematic


Doubled-up nav-below

(4 posts)
  • Started 8 years ago by oldmankit
  • Latest reply from oldmankit
  • This topic is resolved
  1. Hello,

    I did my usual trick of taking a function from content-extensions.php, renaming it with childtheme_override, and then modifying it. I think that's the standard way...

    I copied themeatic_nav_below, and renamed it, as follows:

    // Action to create the below navigation
    function childtheme_override_nav_below() {
    		if (is_single()) { ?>
    			<div id="nav-below" class="navigation">
    				<div class="nav-previous"><?php thematic_previous_post_link() ?></div>
    				<div class="nav-next"><?php thematic_next_post_link() ?></div>
    		} else { ?>
    			<div id="nav-below" class="navigation">
                    <?php if(function_exists('wp_pagenavi')) { ?>
                    <?php wp_pagenavi(); ?>
                    <?php } else { ?>  
    				<div class="nav-previous"><?php next_posts_link(__('<span class="meta-nav">&laquo;</span> Older posts', 'thematic')) ?></div>
    				<div class="nav-next"><?php previous_posts_link(__('Newer posts <span class="meta-nav">&raquo;</span>', 'thematic')) ?></div>
    				<?php } ?>
    	} // end nav_below
    add_action('thematic_navigation_below', 'childtheme_override_nav_below', 2);

    For some reason, on both single pages and all blog pages, it now doubles-up nav-below. All of the nav-below content appears twice. I'm not sure why this would be. Any ideas?


    Posted 8 years ago #
  2. I think you have to add a function to remove the original then add your new one.

    Posted 8 years ago #
  3. Both of the nav-belows are "mine". I have styled them through css - they are definitely not the original. So the original does not need removing. Thanks to this part of the function:

    if (function_exists('childtheme_override_nav_below'))  {
    	function thematic_nav_below() {
    Posted 8 years ago #
  4. Fixed. I removed:

    add_action('thematic_navigation_below', 'childtheme_override_nav_below', 2);
    Posted 8 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.