Prevent WordPress comment spam with a honeypot

Captchas aren't always convenient to stop spam since some bots can figure them out, and also, captchas force a legit human to decipher very complex characters.

Tweaking your user profile page in WordPress

The following functions will help you when tweaking your user page. Use them in the functions.php of your theme: <?php add_action( 'admin_head', 'user_profile_remove_color_scheme'); add_action( 'personal_options', 'sfn_personal_options'); add_action( 'show_user_profile', 'sfn_user_profile' ); add_action( 'edit_user_profile', 'sfn_user_profile' ); add_action( 'user_contactmethods', 'sfn_user_contactmethods'); //hooks for user registration and deletion add_action( 'user_register', 'sfn_user_register'); add_action( 'delete_user', 'sfn_delete_user'); function user_profile_remove_color_scheme() { global $_wp_admin_css_colors; $_wp_admin_css_colors… Continue reading Tweaking your user profile page in WordPress

Display sidebar widgets using a shortcode in WordPress

Widgets are one of the best WordPress tools: you can add a widgetized plugin and show its content in any sidebar in your site. But what happens if you want to show a widget within your post? In this tutorial we will learn how to create a sidebar to be displayed using a shortcode. Overview… Continue reading Display sidebar widgets using a shortcode in WordPress

CSS Card Flip using Webkit Transitions

Webkit brought a lot of enhancements to the formerly dull browser based user interfaces, with transform and transition properties being among the most useful for user interaction. In this tutorial we will learn how to use both to create a product card that flips to reveal more information with a fallback for browsers that don't… Continue reading CSS Card Flip using Webkit Transitions

How to detect iPhone browser natively in WordPress

WordPress has embraced the mobile revolution from the first moment. We have apps for iOS or Android and all the WordPress blogs can be accessed in iPad format. We also have in WordPress core a variable to detect if the user is visiting the site using an iPhone device. In this tutorial we will learn… Continue reading How to detect iPhone browser natively in WordPress

How to detect active widgets in each sidebar

While developing a WordPress theme for a sites network where the built-in calendar widget would be ocasionally included, a special background needed to be applied for the widgets area when the calendar was active, so I needed to detect if the calendar widget was active or not. In this tutorial we will learn how to… Continue reading How to detect active widgets in each sidebar

Add a character counter for the excerpt in WordPress

The excerpt is great for magazine sites where only a small bunch of words can be displayed on the home page. However, the lack of a character counting functionality for the field makes it hard to know how many you already typed in. In this tutorial we will learn how to easily add a character counter for the excerpt.