WordPress.org

Ready to get started?Download WordPress

Forums

Putting a pixel next to the word "admin" in my blog (7 posts)

  1. lizzy12
    Member
    Posted 3 years ago #

    So, i have a pixel of a girl who looks like me. How can i get the pixel and have it be to the right of the word admin next to each post ?

    http://www.liz.dementedsquirrel.com

    thanks

  2. racer x
    Member
    Posted 3 years ago #

    Wow, one pixel that looks like you? (Just teasing)

    http://www.smashingmagazine.com/2009/07/23/10-wordpress-comments-hacks/

  3. lizzy12
    Member
    Posted 3 years ago #

    haha. thanks.
    The link wasnt what i was looking for though. It didnt help.

    -sorry,

  4. racer x
    Member
    Posted 3 years ago #

    Sorry, I thought you were referring to the gravatar image or something.
    You may have to be a little more specific in your request. Every theme is different.

    If you are referring to something like "Posted by Admin(image here)" and that is where you want the graphic there are several ways.

    It can be done in the theme files, through a custom shortcode, custom function, etc.
    What is your programming skillset level and I can suggest something based in that?

  5. lizzy12
    Member
    Posted 3 years ago #

    Yea, I ment Posted by admin (pixel here)

    My skill level..hmm..low...I am new to WP and have no idea what i'm doing. I've never made a theme before...or edited one..
    Is their a way to just put the image code in right after "Posted by Admin " ?

  6. Darrell Schauss
    Member
    Posted 3 years ago #

    What are you doing to make it show there in the first place?

  7. racer x
    Member
    Posted 3 years ago #

    You can just add the image code right after that if you want. You will have to know which template file to add it to.

    You can alternately add this code to your functions.php file:

    // Add an image for the Author posts
    // Make sure your author id is = 1
    // Make sure the path to the image is correct
    function author_add_image() {
    	global $posts;
    	$postAuthor = $posts[0]->post_author;
    	if ( $postAuthor == 1 ) {
    		$alternateAuthorDisplay = 'admin <img src="full_path_to_image.jpg" width="15" height"15" alt="the admin" />';
    		return $alternateAuthorDisplay;
    		}
    }
    add_filter( "the_author", "author_add_image" );

    Hope this helps.

Topic Closed

This topic has been closed to new replies.

About this Topic