WordPress.org

Ready to get started?Download WordPress

Forums

function to add text to comment author (2 posts)

  1. Gale Andrews
    Member
    Posted 4 years ago #

    I finally got my issue resolved of adding to the database! Yay and thanks to the mod who pointed me to the right directon!

    Now what I am trying to do is to put an icon or some text next to an author that meets certain conditions from the wp_users table. What function can I use? I tried some of the comment functions but they all either remove the comment itself or replace them ALL with the text I specify.

    function embed_admingraphic(){
    	echo "<img src=admin.jpg>";
    }
    
    add_filter('comment_text', embed_admingraphic);

    Thi puts my admin icon in place of every comment on my blog. What I want to do is to append or prepend it so it goes in after or before.

    It would be nice to add a <p></p> right after the comment authors name and put what I want in there instead.

    If anyone has a good idea, please post it! Thanks

  2. MichaelH
    Member
    Posted 4 years ago #

    What about looking at a plugin that does something similar
    http://wordpress.org/extend/plugins/user-photo/

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags