Working With WordPress Hooks
How do you know what WordPress is fetching from your database when someone does a site search? Does it include the custom post types created by your specialty theme or plugins? Did you want it to? Larry Aronson provides a quick and dirty hack for displaying the main SQL query statement in the footer of a WordPress page.
Category: Functions
A WordPress Macro Shortcode
Posted in Functions, ShortCodes on Jun 17th, 2011
Good News Everyone! The post/page editor is getting an upgrade with the soon-to-be-released version 3.2 of WordPress. This solves the problem of disappearing Google maps and YouTube videos, both of which rely on iframe elements to embed the contents of one webpage into another. Because the current version of WordPress’ built-in editor doesn’t like iframes you have to limit yourself to working in the editor’s HTML mode. Once you switch to Visual mode, the iframe elements are stripped out of your post and the map or video disappears. While this limitation is removed in the next release, one of the work-arounds that WordPress developers devised is worth a second look. A general purpose macro shortcode that saves you from ever having to work in the HTML mode again.
There are a lot of WordPress plugins that will put a Popular Posts widget in your blog’s sidebar. But, they all return different results. Often, the best approach is to just throw a page with a list of permalinks into your sidebar. Here’s how to create a sidebar widget that will display a page featuring the posts you want to highlight.