Development on a Shoestring

Trackbacks Template WordPress Plugin

This plugin adds a template tag ‘trackback_template()’ that displays the list of trackbacks/pingbacks that a post or page has received.  By default it renders them as an unordered list inside a div with the id "trackbackslist" with a h3 heading "Trackbacks" above the list. The text snippet of the trackback is displayed in a paragraph tag above the link.  Alternatively if you’re comfortable with editing HTML & PHP you can add a file called trackbacks.php into your template folder and the plugin will use that to style this list. 

Installation

Download the plugin (see link above) & extract the zip file into your plugins folder.  Then activate it from the plugins page in WordPress admin.  That’s it.  There is no admin page for this plugin, it’s really that simple.

Modifying the template

As mentioned above, the plugin will render the trackbacks by default as a list, but you can change this to do whatever you want. This is contained in a file called ‘trackbacks.php’ in the plugin folder, which you can copy into your template folder to use as a starting point for styling your own list.  The trackbacks are contained in a variable called $trackbacks which is an array of comment objects.

  • I found an article to separate trackback and comment without plugins. I think I found it in wp codex, I think it will help us reduce CPU resource
  • BFS
    WP 2.7, defaut template. Installed plugin according to directions and added the 'trackback_template()' tag to single.php directly above the comments template. Getting the following error:

    PHP Fatal error: Call to undefined function: trackback_template() in /var/www/html/wp-content/themes/default/single.php

    I guess the obvious question is whether this plugin is compatible with 2.7?

    Thanks
  • Bob
    The README does not show the correct tag to add to your templates. It specifies `trackback_template()`, but it should say `trackbacks_template()`

    Thanks
blog comments powered by Disqus