ThemeShaper Forums » Thematic

[closed]

previous post link and next post link

(2 posts)
  • Started 11 years ago by @soren
  • Latest reply from @soren
  • This topic is not resolved
  1. I would like to add to the previous post link and next post link with "By author". I find this code to create the previous and next post, but how do you add the "By author" link after the title?

    Thanks
    Soren

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

    // creates the next_post_link
    function thematic_next_post_link() {
    $args = array ('format' => '%link',
    'link' => '%title <span class="meta-nav">»</span>',
    'in_same_cat' => FALSE,
    'excluded_categories' => '');
    $args = apply_filters('thematic_next_post_link_args', $args );
    next_post_link($args['format'], $args['link'], $args['in_same_cat'], $args['excluded_categories']);
    } // end thematic_next_post_link
    [code/]

    Posted 11 years ago #
  2. I did try this, but that did not work... anyone has a better solution? :)

    [code]
    function edit_post_link($postlink) {
    global $post;
    if(is_page() || is_404()){
    $postlink = thematic_nav_above();
    } else {
    $postlink = thematic_previous_post_link() .thematic_postmeta_authorlink();
    $postlink .= thematic_nav_above() . thematic_postmeta_authorlink();
    }
    return $postlink;
    }
    add_filter('thematic_nav_above', 'edit_post_link');
    [code/]

    Posted 11 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.