ThemeShaper Forums » Thematic


Add custom text to post navigation links

(4 posts)
  • Started 11 years ago by tcarnell
  • Latest reply from Direct Sponsor
  • This topic is not resolved
  1. tcarnell

    Hi everyone,

    I'm displaying the usual Previous/Next post navigation above each of my posts.
    I want to add a bit of custom text to these links, so they appear as
    « Previous Post: POST TITLE Next Post: POST TITLE »

    It's the 'Previous Post: ' and 'Next Post: ' text that I want to add.

    Can anyone give me some idea of what I need to put in a custom function to perform this?

    Many thanks in advance,

    Posted 11 years ago #
  2. I also require this.

    It seems clear here:

    Thematic doesn't seem to make use of the standard functions so I'm not too sure how to apply it.

    Where can I find: thematic_previous_post_link?

    Posted 10 years ago #
  3. I found the following solution in another thread (

    To customize the content of the links try tweaking some of the values in the below filter:

    function childtheme_override_previous_post_link() {
    	$args = array ('format' => '%link',
    		       'link'   => '<span class="meta-nav">MMM</span> %title',
    		       'in_same_cat' => FALSE,
    		       'excluded_categories' => '');
    	$args = apply_filters('childtheme_prev_post_link_args', $args );
    	previous_post_link($args['format'], $args['link'], $args['in_same_cat'], $args['excluded_categories']);
    } // end thematic_previous_post_link

    You can further customize the links by removing the navigation:

    function remove_post_navigation() {
            remove_action('thematic_navigation_above', 'thematic_nav_above', 2);
    add_action('init', 'remove_post_navigation');

    ...and adding whatever you require:

    function add_custom_navigation_above() {
    	<div id="nav-above" class="navigation">
    	 <div class="nav-previous"><?php thematic_previous_post_link() ?></div>
    	 <div class="nav-next"><?php thematic_next_post_link() ?></div>

    This will do the trick ;-)

    Posted 10 years ago #
  4. This plugin may save you some time:

    I've used it for implementing tooltips on the post links.

    Posted 10 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.