ThemeShaper Forums » Thematic


Moving the "Leave a Comment" link to top of post

(6 posts)
  • Started 11 years ago by adamvonwillis
  • Latest reply from acts7
  • This topic is not resolved
  1. I have been searching through the forum (and the rest of the internet) for the answer, but I just can't find it. Maybe I'm daft. I'm trying to move the "Leave a Comment" or "# comment/s" link to the top of the post under the title of the post. I guess I would have to move that link from the .entry-utility to the .entry-meta. I can't figure out how to do this. The end result would look like this:

    By ADAM WILLIS | Published: JULY 30, 2010 | Leave a comment

    Any help would be greatly appreciated!

    Posted 11 years ago #
  2. initial thought is that you will have to override the thematic_postfooter() to remove thematic_postfooter_postconnect(). then you will have to override the thematic_postheader_postmeta() to add the thematic_postfooter_postconnect(). look in content-extensions.php in the thematic library. you can copy alot of the material into your functions.php and make the few changes there. it's late or i would test this. hope that gets you on the right path.

    Posted 11 years ago #
  3. acts7

    Hope this is in time to assist you:


    Posted 11 years ago #
  4. acts7

    function my_postheader_postmeta() {
    global $id, $post, $authordata;

    $posteditlink .= '<a href="' . thm_bloginfo('wpurl', FALSE) . '/wp-admin/post.php?action=edit&post=' . $id;
    $posteditlink .= '" title="' . __('Edit post', 'thematic') .'">';
    $posteditlink .= __('Edit', 'thematic') . '';
    $posteditlink = apply_filters('thematic_postheader_posteditlink',$posteditlink);

    $postmeta = '<div class="entry-meta">';
    $postmeta .= '<span class="comment-count">';
    $postmeta .= my_postfooter_postcomments();
    $postmeta .= '</span>';
    // Display edit link
    if (current_user_can('edit_posts')) {
    $postmeta .= '<span class="edit">' . $posteditlink . '</span>';
    $postmeta .= "</div><!-- .entry-meta -->\n";

    $postheader_close = "</div><!-- .post_header -->\n";

    $my_postheader_close = $postmeta . $postheader_close;
    return $my_postheader_close;

    Posted 11 years ago #
  5. acts7

    Then remove the comment count from the footer.

    function my_thematic_postfooter() {

    global $id, $post;

    if ($post->post_type == 'page' && current_user_can('edit_posts')) { /* For logged-in "page" search results */
    $postfooter = '<div class="entry-utility">' . thematic_postfooter_posteditlink();
    $postfooter .= "</div><!-- .entry-utility -->\n";
    } elseif ($post->post_type == 'page') { /* For logged-out "page" search results */
    $postfooter = '';
    } else {
    if (is_single()) {
    $postfooter = '<div class="entry-utility">' . thematic_postfooter_postcategory() . thematic_postfooter_posttags() . thematic_postfooter_postconnect();
    } else {
    $postfooter = '<div class="entry-utility">' . thematic_postfooter_postcategory() . thematic_postfooter_posttags() /*. thematic_postfooter_postcomments()*/;
    $postfooter .= "</div><!-- .entry-utility -->\n";

    // Put it on the screen
    echo $postfooter; // Filter to override default post footer
    } // end postfooter

    Posted 11 years ago #
  6. acts7

    Stick both of those in your functions file of your child theme and you'll be rocking.

    Oh yeah, I commented out the comment count from the footer - so you could see where it was. Just delete whats between the /* and */ to remove it permanently.

    Posted 11 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.