Strict Standards: Redefining already defined constructor for class bbdb in /home/themes/public_html/forums/bb-includes/db-mysql.php on line 12

Strict Standards: Declaration of BB_Walker_Blank::start_lvl() should be compatible with BB_Walker::start_lvl($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127

Strict Standards: Declaration of BB_Walker_Blank::end_lvl() should be compatible with BB_Walker::end_lvl($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127

Strict Standards: Declaration of BB_Walker_Blank::start_el() should be compatible with BB_Walker::start_el($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127

Strict Standards: Declaration of BB_Walker_Blank::end_el() should be compatible with BB_Walker::end_el($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127
Add custom text to post navigation links « ThemeShaper Forums

ThemeShaper Forums » Thematic

[closed]

Add custom text to post navigation links

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

    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,
    Tony.

    Posted 5 years ago #

  2. Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512


    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512
    Direct Sponsor

    Member

    I also require this.

    It seems clear here: http://codex.wordpress.org/Next_and_Previous_Links

    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 4 years ago #

  3. Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512


    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512
    Direct Sponsor

    Member

    I found the following solution in another thread (http://forums.themeshaper.com/topic/change-previous_post_link-appearance-by-filter-not-working).

    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
    add_filter('thematic_previous_post_link','childtheme_override_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>
    	</div>
       <?php
    }
    add_action('thematic_navigation_above','add_custom_navigation_above');

    This will do the trick ;-)

    Posted 4 years ago #

  4. Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512


    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512
    Direct Sponsor

    Member

    This plugin may save you some time:
    http://wordpress.org/extend/plugins/ambrosite-nextprevious-post-link-plus/

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

    Posted 4 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.


Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method GA_Filter::spool_analytics() should not be called statically in /home/themes/public_html/forums/bb-includes/wp-functions.php on line 586

Strict Standards: Non-static method GA_Filter::spool_this() should not be called statically in /home/themes/public_html/forums/my-plugins/googleanalytics.php on line 183