WP-Mix

A fresh mix of code snippets and tutorials

Popular Posts

All posts ordered by popularity

Page 29 of 35

Display a custom gravatar in WordPress

Using your own custom gravatars (aka avatars) in WordPress is a piece of cake.

Display the visitor’s Google search terms

A neat trick in your themes is to display the search terms used by the visitor somewhere on the page. Here’s how to do it for visitor’s arriving at your site after searching in Google.

Superbox replace rel with data-rel

At WP-Tao.com, I use jQuery Superbox to display lightbox-style popup images and screenshots. Here is a quick mod used to replace rel attributes with data-rel.

jQuery Toggle Password Field

Just a quick jQuery code snippet to toggle a password field. I used this technique for the license field of my premium WordPress firewall plugin, BBQ Pro. Sharing it here for reference and just in case I need to use it again.

CSS Viewport Tricks

Note to self: you can specify various viewport properties such as initial-scale and user-zoom via <meta /> tags or directly via CSS.

WordPress Remove Menu Item

Quick WordPress tutorial for you today. How to remove an unwanted item from the WordPress menu. You know, the main menu that you find on the left-hand side of the screen when logged into the WordPress Admin Area. If you have a menu item that you want to remove, this post shows an easy way […]

Triple Loop Navigation

Never thought this was possible, and still don’t know for sure because I haven’t had time to test this code sample found in a pastebin. Included here in its entirety for reference.

Obscure template tags that rock

Here are my favorite “lesser-known” and perhaps even obscure template tags for WordPress:

WordPress Get Edited Post ID

Working on my plugin Disable Gutenberg, I needed a way to get the ID of an edited post. Not on the front-end, but on the “Edit Post” screen in the WP Admin Area. Unfortunately WordPress does not provide a built-in core function for handling this, so it’s necessary to roll our own solution.

Display external feeds in WordPress

WordPress makes it so easy to display external RSS feeds anywhere in your theme.

CSS Style Placeholders

When displaying with HTML forms, most modern browsers display placeholder values for textarea and input fields. Once you’ve added placeholder attributes to your form fields, you can style their appearance via CSS.

772×250 vs 772×250

Just a heads up for Photoshop users exporting graphics for their WordPress plugin in the WP Plugin Directory.