Jun 142011

Sometimes guests write something on my weblog. I like guest posts to have a different background color. In the past I realized this with a little bit of PHP code and some CSS styling. To realize this in a nicer way and to make it available to more people I crafted another WordPress plugin for it. With the Author Color plugin each author can simply set the post background and border color using the personal option of his/her profile page.

Install now

Author Color - Profile personal optionsAuhor Color - Example post

  15 Responses to “WordPress plugin: Author Color”

  1. your plugin doesnt work for me.
    I am using the WP-Chatter theme.


  2. You have a very good skill and I have used a few of your plugins, I just wonder if we can get together sometimes to talk about more technical part of wordpress plugins.

  3. Hi Marcel..
    I would like to try this plugin but I can’t find that my theme is using post_class and that’s why i does not work I think?

    • Hi Stein, you here too 😉
      What theme are you using?

      Edit: I just remembered you are using the Advanced Newspaper theme. If you send me a copy I will look if the theme calls post_class and if it doesn’t tell you what to do.

      • I sent you the theme earlier, but if you don’t find it I’ll send it again.. 😉
        I have searched the theme folder with Grep on all php files, could not find the post_class..

  4. Only the administrator account is showing the proper colors. The other two accounts are not. I’m using Weaver theme.

    • I have just tested it and it should work for non-administrators too.
      Didn’t you accidentally forgot to enable author color for the other two accounts?

      • It’s activated in all three accounts. I’ve tried logging into all three accounts separately and looking and I’ve also tried deactivating only the admin account and activating only a single user account. I’m using the WEAVER theme.

        • If your theme uses the post_class function it should work. The account type (admin or not) does not matter. Try switching to the default theme temporarily to see if the theme is the problem or not.

          • I updated WP, and about three themes and four plugins before doing anything else today. I switched to the default theme ands deactivated all plugins except Author Colors and I still only git colors for the ADMIN account. The second account is also an admin account and the third one is an editor. Here is the HTML source for three posts in a row – two without color and one with:

            <a href="http://localhost/2011/06/18/run-away-auburn/" title="Permalink to Run Away Auburn" rel="nofollow">Run Away Auburn</a>
            				Posted on <a href="http://localhost/2011/06/18/run-away-auburn/" title="7:33 pm" rel="nofollow">18 June 2011</a> by <a href="http://localhost/author/scott-f/" title="View all posts by Scott F" rel="nofollow">Scott F</a>			<!-- .entry-meta -->
            				<a href="http://localhost/2011/06/18/run-away-auburn/img_0442/" rel="nofollow"></a>Auburn
            I got up this morning to go grocery shopping. I left the house around 6;30 to get an early start at the stores. Half way down Logan Road and almost to Andrews I spotted our cat Auburn. John thinks he might be trying to find our old house out on 54. It would explain a bit. The other missing cats were raised out there and Auburn came from the woods out there. So maybe our other cats are trying to find their way back to what they consider their true home. Anyway I made him get in the SUV and took him back home. He just meowed all the way home. I know he was begging for forgiveness and hoping he didn’t get a spanking or a lecture from me his “daddy”. He’s been inside all day since wanting nothing more than to just sit in my lap and be petted. I guess it’s his way of saying. “I am sorry.”
            							<!-- .entry-content -->
            						Posted in <a href="http://localhost/category/pets/cats/auburn/" title="View all posts in Auburn" rel="nofollow">Auburn</a>, <a href="http://localhost/category/pets/cats/" title="View all posts in Cats" rel="nofollow">Cats</a>, <a href="http://localhost/category/pets/" title="View all posts in Pets" rel="nofollow">Pets</a>					
            												<a href="http://localhost/2011/06/18/run-away-auburn/#respond" title="Comment on Run Away Auburn" rel="nofollow">Leave a comment</a>
            				| <a href="http://localhost/wp-admin/post.php?post=65&amp;action=edit" title="Edit Post" rel="nofollow">Edit</a>			<!-- .entry-utility -->
            		<!-- #post-## -->
            			<a href="http://localhost/2011/06/18/and-away-we-go/" title="Permalink to And Away We Go …" rel="nofollow">And Away We Go …</a>
            				Posted on <a href="http://localhost/2011/06/18/and-away-we-go/" title="5:44 pm" rel="nofollow">18 June 2011</a> by <a href="http://localhost/author/john-w/" title="View all posts by John W" rel="nofollow">John W</a>			<!-- .entry-meta -->
            				<a href="http://localhost/2011/06/18/and-away-we-go/dorito-thief-2/" rel="nofollow">Dorito Thief</a>
            Starting to add a little content now.
            <a href="http://localhost/2011/06/18/and-away-we-go/dorito-thief/" rel="nofollow">Dorito Thief</a>
            							<!-- .entry-content -->
            						Posted in <a href="http://localhost/category/uncategorized/" title="View all posts in Uncategorized" rel="nofollow">Uncategorized</a>					
            												<a href="http://localhost/2011/06/18/and-away-we-go/#respond" title="Comment on And Away We Go …" rel="nofollow">Leave a comment</a>
            				| <a href="http://localhost/wp-admin/post.php?post=53&amp;action=edit" title="Edit Post" rel="nofollow">Edit</a>			<!-- .entry-utility -->
            		<!-- #post-## -->
            			<a href="http://localhost/2011/06/18/appearences/" title="Permalink to Appearences" rel="nofollow">Appearences</a>
            				Posted on <a href="http://localhost/2011/06/18/appearences/" title="2:05 pm" rel="nofollow">18 June 2011</a> by <a href="http://localhost/author/admin/" title="View all posts by Admin I. Strator" rel="nofollow">Admin I. Strator</a>			<!-- .entry-meta -->
            				Well, I’ve been adding plug-ins and themes to the site and doing some tweaking.&nbsp; Now I need to added some more content so I can see what the tweaks actually look like&nbsp; and so so I can tweak some more.
            							<!-- .entry-content -->
            						Posted in <a href="http://localhost/category/uncategorized/" title="View all posts in Uncategorized" rel="nofollow">Uncategorized</a>					
            						Tagged <a href="http://localhost/tag/blutterbunged/" rel="nofollow">Blutterbunged</a>, <a href="http://localhost/tag/themes/" rel="nofollow">Themes</a>, <a href="http://localhost/tag/tweaks/" rel="nofollow">Tweaks</a>					
            								<a href="http://localhost/2011/06/18/appearences/#respond" title="Comment on Appearences" rel="nofollow">Leave a comment</a>
            				| <a href="http://localhost/wp-admin/post.php?post=48&amp;action=edit" title="Edit Post" rel="nofollow">Edit</a>			<!-- .entry-utility -->
            		<!-- #post-## -->
            • Obviously the < code > and < /code > blocks are not working for HTML source. Can you email me and I’ll send the source directly to you in a zipped file?

  5. hi marcel.

    your plugin doesnt work for me. i have to note that other authorcolor plugins are behaving the same.
    do i use a bad theme? what are the requirements for your plugin to work?

    • There are no special requirements, except that the function ‘post_class‘ should be called. Tell me what theme you are using and I will try to figure out why the plugin is not working for you.