ThemeShaper Forums » Thematic

[closed]

add html link to post-meta

(5 posts)
  • Started 13 years ago by dot-brian
  • Latest reply from dot-brian
  • This topic is not resolved
  1. dot-brian
    Member

    I am trying to add an html link for email subscriptions within the post-meta...is this possible?
    Thanks!

    Posted 13 years ago #
  2. Hi dot-brian

    This may be helpful.

    http://forums.themeshaper.com/topic/change-the-post-metadata-text-for-icons#post-4670

    -Gene

    Posted 13 years ago #
  3. dot-brian
    Member

    Thanks...I read that and tried to apply the code to functions.php but for some reason I am not putting it in correctly. Where do I put it? And, how?

    Here is what I did...$postmeta .= '<span class="email-link">Sign up for <b>Daily Shot</b>'</span>

    Posted 13 years ago #
  4. Add something like this in your functions.php:

    function my_postheader_postmeta() {
        global $id, $post, $authordata;
    
        $postmeta = '<div class="entry-meta">';
        $postmeta .= '<span class="meta-prep meta-prep-author">' . __('By ', 'thematic') . '</span>';
        $postmeta .= '<span class="author vcard">'. '<a class="url fn n" href="';
        $postmeta .= get_author_link(false, $authordata->ID, $authordata->user_nicename);
        $postmeta .= '" title="' . __('View all posts by ', 'thematic') . get_the_author() . '">';
        $postmeta .= get_the_author();
        $postmeta .= '</a></span><span class="meta-sep meta-sep-entry-date"> | </span>';
        $postmeta .= '<span class="meta-prep meta-prep-entry-date">' . __('Published: ', 'thematic') . '</span>';
        $postmeta .= '<span class="entry-date"><abbr class="published" title="';
        $postmeta .= get_the_time(thematic_time_title()) . '">';
        $postmeta .= get_the_time(thematic_time_display());
        $postmeta .= '</abbr></span>';
    
         // Display email link
        $postmeta .= '<span class="email-link">your email link here</span>
    
        // Display edit link
        if (current_user_can('edit_posts')) {
            $postmeta .= ' <span class="meta-sep meta-sep-edit">|</span> ' . '<span class="edit">' . $posteditlink . '</span>';
        }
        $postmeta .= "</div><!-- .entry-meta -->\n";
        return $postmeta;
    }
    add_filter('thematic_postheader_postmeta','my_postheader_postmeta');
    Posted 13 years ago #
  5. dot-brian
    Member

    Great! Thanks for the help Gene...much appreciated!
    Brian

    Posted 13 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.