Adding a hyperlink to every comment
-
Here is an image of my comment format: https://oi40.tinypic.com/8w07jt.jpg
The hyperlink to each individual comment is the date and time with the url in the format of, for example: /nottingham/#comment-184 – FYI I’m using the Photoria theme.
After going through my comment templates I found that these two functions do the following,
get_comments_link : Retrieves the link to the current post comments
AND
comments_link: Displays the link to the current post comments
The problem is I have no idea where to include these functions so it creates a hyperlink to every comment within every comment. Once this link has been created I’d also like to assign a div to it so I can format it to be in the bottom right corner of each comment. On another forum one person replied to me “you need to locate the template for 1 comment in your loop and post it in your question” but I’m not sure how to do this! I removed the comments function from my loop because I wanted the comments to display on all pages only, so put it in page.php instead. So not sure whether he meant that code or the code from comments.php (wp_list_comments) ?
My final goal is to manipulate the link so rather than the comment link itself it will automatically work in the facebook.com/sharer.php which I feel I can do myself once I figure out the previous part. Essentially it will be a share on facebook button, but I have found no plugins which do this yet and thought describing it as a hyperlink would be an easier way to explain what I’m trying to do.
I hope I’ve made the question clear, please ask if I haven’t. Thanks in advance!
- The topic ‘Adding a hyperlink to every comment’ is closed to new replies.