Feb27
Customize to display trackback URL in WordPress comments
I have an email from someone to ask me about how to display/separate trackback url like the comment in my posts.Here is the trackback url example that I have customized to display in the comment in my posts by separating the trackback out of real comments from real visitors and group them on the top of real posts.In order to customize your trackback URL style you need to edit 2 files in wordpress source code.
1. comments.php locate in wp-content/themes/YourTheme/comments.php
2. comment-template.php locate in wp-includes/comment-template.php
Edit comments.php
First look for the following line inside comments.php Before the above line paste the following code: Next look for the following line Before the above line paste the following code: Next look for the following line Before the above line paste the following code: After edit file your code look like this In the code above, the trackbacks list will be shown before comments list in your post/page.You can place the trackbacks loop after comments loop.
Edit comment-template.php
Look for the following line (around line 45 in function get_comment_author_link() ) Before the above line paste the following code: Next look for the following line around line 49 After the above line paste the following code: Finally,save and upload both files to your server.
1. comments.php locate in wp-content/themes/YourTheme/comments.php
2. comment-template.php locate in wp-includes/comment-template.php
Edit comments.php
First look for the following line inside comments.php Before the above line paste the following code: Next look for the following line Before the above line paste the following code: Next look for the following line Before the above line paste the following code: After edit file your code look like this In the code above, the trackbacks list will be shown before comments list in your post/page.You can place the trackbacks loop after comments loop.
Edit comment-template.php
Look for the following line (around line 45 in function get_comment_author_link() ) Before the above line paste the following code: Next look for the following line around line 49 After the above line paste the following code: Finally,save and upload both files to your server.
Comments are closed.




