Subscribe to the RSS Feed
FreeWordpressThemes.us
Free WordPress Tutorials and Themes.

Highlight Author Comments in WordPress, The Easier Right Way

March 2nd, 2010 by admin

I just came across a post published today which goes over “the right way” to highlight author comments in WordPress. Basically, instead of the usual code that inserts the “admincomment” class for just the first user (user ID 1). In the post, that code is adapted for any post author, no matter what the user ID is, which can be especially useful to multi-author blogs.

Ever since WordPress 2.7 was released over a year ago, a new function was introduced to display comments called wp_list_comments which is known for supporting threaded comments as well. In addition to threaded commments, it also outputs a class automatically which can be used to style author comments in WordPress 2.7.

Screencast

In this screencast, I go over the various classes added to a comment made by a post author. I also go over how to style the .bypostauthor class.

Code Examples in Video:

  • .bypostauthor { background: #000; } /* Sets a black background on post author comments. */
  • .bypostauthor { background: #000 !important; } /* Overrides any other background colors. */
  • .commentlist .bypostauthor { background: #000; } /* Another way to override other background colors (depends on how your theme is coded) */

In case you’re wondering, I was using the Firebug Firefox extension to inspect the element as well as test out the CSS code. Definitely a must-have addon for coders.

Custom Callback?

If you’re using a custom callback in conjunction with wp_list_comments, all you need to do is make sure the comment_class function is present in your callback, which will generate the same classes on each comment.

For an example of this, check out ThemeShaper’s tutorial on creating a comments template, check out where <?php comment_class() ?> is added, and copy it in the same place of your own custom callback (assuming it’s not already there).

Conclusion

If you’re using an outdated theme that does not use wp_list_comments, the code from the first link should be just fine. If you’re using wp_list_comments, this is a much better and easier solution to implement, as you probably won’t have to modify any PHP in your theme (unless of course you have a custom callback).

Anyway, hope you liked the CSS tip. Let me know what you think in the comments. Also, do you prefer screencasts plus text, or just text?

Related posts:

  1. Change Your WordPress Author Name…Please
  2. Spectacu.la Releases Threaded Comments Plugin
  3. WordPress Weekend Resources: September 11, 2009
Written by - Visit Website

Posted in Theme Labs | No Comments »

WooThemes – Optimize

March 1st, 2010 by admin

business wordpress theme optimize WooThemes   Optimize

The much anticipated WordPress theme Optimize has hit wicked wordpress and is here to stay, A really beautiful theme with all the essential options you would expect from Woothemes. Comes with the new and updated wooFramework, Woo custom navigation, A featured showcase for all your best work, integrated lightbox to add that cool shading to your images, a separate Portfolio page, works with all available browsers, an amazing flexible layout with the ability to shift your sidebars and content areas the way you want it, 22 stunning color styles and multiple link color styles to choose from so no optimize will ever be the same. An amazing theme. Check it out!

| Download Now | Downloads [3775] |

Wordpress bookmarks

Written by - Visit Website

Posted in Stuff from Wicked Theme | No Comments »

Dirty WordPress Hack Going Around, Cloaked to Search Engines

March 1st, 2010 by admin

Recently there’s been a WordPress hack going around which has been using cloaking to target Google IP addresses. That means, the spammers/hackers are somehow getting into your WordPress blog, and generating a bunch of spam content and links that only Google can see.

This particular hack uses some particularly dirty methods which include inserting spam keywords into your own content, which is probably to control your keyword density.

Also they don’t seem to place more than a couple spam links on the page, which is probably because they don’t want you to get banned (so you can still pass link juice to them). Kind of like a parasite not trying to kill it’s host.

I’ve made a quick screencast to go over what the hack does and how to see if it’s happened to your site.

What We Know So Far

  • Altered content is only visible to search engines like Google and Yahoo, regular visitors won’t notice.
  • There are probably “rogue” files on somewhere on your WordPress install that need to be deleted.
  • Existing WordPress files may be altered with encrypted code added.
  • There might be duped admin accounts on your WordPress install as well that need to be removed.

If you have any other information, please leave a comment below. I’ll update this post with new information periodically.

Related posts:

  1. Optimizing WordPress for Search Engines
  2. WordPress Security Alert – Vulnerability in 2.3.3
  3. How to install a WordPress plugin
Written by - Visit Website

Posted in Theme Labs | No Comments »

SleekChips Poker

February 28th, 2010 by admin


DEMO
DOWNLOAD

Written by - Visit Website

Posted in Stuff from qualitywordpress.com | No Comments »

SleekChips Poker

February 28th, 2010 by admin


DEMO
DOWNLOAD

Written by - Visit Website

Posted in Stuff from qualitywordpress.com | No Comments »