Support » Fixing WordPress » Putting a pixel next to the word “admin” in my blog

Viewing 6 replies - 1 through 6 (of 6 total)
  • Wow, one pixel that looks like you? (Just teasing)

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


    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?

    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 ” ?

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

    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.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Putting a pixel next to the word “admin” in my blog’ is closed to new replies.