Moving "Comments" link to another location

  • Unknown's avatar

    Hi,
    I’m using 2010 theme and modifed it via CSS to how I like it to be seen. The only change that I’d like to do is to move “Leave a comment” link from under the post to a top of the post just like it is done with 2011 theme. I do not want to change themes as it will require a lot of CSS rework…

    So, is it possible to move “leave a comment” link in 2010 theme to another locaiton and ideally make it look similar to 2011 via changes to CSS?

    thanks!

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    The following will do it, but it comes with a warning. The comment link has to be positioned within the post div using position absolute. That means it will no longer “flow” with the other elements, so if your title happens to go to 2 or 3 lines, the comment link is not going to flow down with the other elements in the post. It is always going to stay fixed in relationship to the top and right of the post div. The last chunk of code below sets a width for the post title to keep it from running over the comment link if the title gets close to the width of the content area.

    .hentry {
    position: relative;
    }
    
    .comments-link {
    position: absolute;
    right: 0;
    top: 52px;
    }
    
    .hentry .entry-title {
    width: 800px;
    }
  • Unknown's avatar

    Sweeet! thanks a lot.

    So is there some type of map for wp themes that show what CSS names it is using? The code in each theme uses these CSS properties, but many of them are inherited from other properties and not shown in CSS at all. Also, many names are not very descriptive and it is hard to know what they are used for. Some kind of mapping would be very nice to have. Make sense?

  • Unknown's avatar

    No, that would be a gargantuan task as CSS is theme specific and each theme designer decides what they are going to name the selectors and how they are going to organize the markup (XHTML).

    Your best bet would be to get Firefox (if you are not using it) and then get the Firebug add-on which will makes doing CSS far easier. On one side of the window it will show the markup and on the other side the CSS and you can select elements and the stuff associated with those elements will be shown in the Firebug pane at the bottom of the browser window.

  • Unknown's avatar

    Great, thanks for reference. I’ll check this firebug tool when I get a chance.

  • Unknown's avatar
  • The topic ‘Moving "Comments" link to another location’ is closed to new replies.