Just another WordPress weblog
RSS icon Home icon
  • Add Technorati tags to WordPress posts

    Posted on July 15th, 2007 flod 1 comment

    technorati_tags.png

    There are several WordPress plug-ins that allow to add Technorati tags at the end of your posts. In my experience with WordPress plug-ins, I tend to prefer the simpler ones for an elementary reason: usually reliability is inversely proportional to complexity ;-)

    On this basis I chose SimpleTags. SimpleTags allows to manage TAGS directly inside the WordPress editor: it’s possible to add tags as a list at the end of the post (syntax [tags ]…[/tags ], without spaces before the closing square brackets) or define TAGS progressively using the post’s content (with the syntax [tag ]example[/tag ], without spaces before the closing square brackets).

    To improve the appearance of the results, you need to make little modifications to the plug-in code and the WordPress template.

    Open simpletags.php with a text editor (possibly with syntax highlight support): you should see these two lines of code just after the initial comments

    $pre_replacement = '<p> Technorati Tags: ';
    $post_replacement = '</p>';

    You need to modify the variable $pre_replacement in order to add a class to the generated “Technorati Tags” paragraph:

    $pre_replacement = '<p class="tag_technorati"> Technorati Tags: ';
    $post_replacement = '</p>';

    Now you have to save the image used for the icon in the images folder inside the current template and add this rule to the style sheet:

    .tag_technorati {
    background: transparent url(images/technorati.gif) no-repeat scroll left center;
    padding: 8px 2px 8px 20px;
    }

    Obviously, if you want you can also modify the variable $pre_replacement to create a DIV instead of a paragraph.

    Technorati Tags: , ,

     

    One response to “Add Technorati tags to WordPress posts”

    1. gaziantep nakliyat

      thank you:D

    Leave a reply