Here’s the code: // [showfiles] function dump_files($atts) { extract(shortcode_atts(array(), $atts)); global $post; $return = ''; $children = get_children( 'numberposts=-1&orderby=menu_order&order=ASC&post_type=attachment&…
I needed this functionality, and decided to create a function. Since it was so easily digestable, I figured I’d just post it here. Here’s the function function set_post_background() { global $post; $bgimage = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID…
I haven’t posted in a very long time, but as soon as I stumbled on this functionality I had to share it immediately, so here it is: It is possible to add a filter function to add new text to the password protected page. The code to add to your functions.php files is as follows: <?php add_filter( '…
If you’ve ever been upgrading a WordPress installation and had it fail, leaving you in the dark depths of maintenance mode, you’ll agree with me that it can be quite a headache. Much like a site launch or a database move, it can take either 5 minutes, or 5 hours, but it never seems to fall in b…
I was trying to create a sub-navigation menu that would only show if there were child pages in WordPress the other day, but to my knowledge, there is no has_children() or has_child() type of conditional available. I’m sure it’s because there are so many other ways to check for children.…
In my work I create a lot of WordPress sites for my clients, and often times we’ll put the share links and social proof in the footer of each post. Some time ago, facebook introduced the like button for public use with iframes, which makes it very easy to incorporate just about anywhere, the only p…
I write a lot of code snippets on this site, some stuff is found by searching for the solution to a specific problem, others are found by trying to do new things with WordPress. I was thinking of creating a site with code Snippets that could be downloaded by anyone who stumbled on the site, and submitted b…
Below is a quick video that shows how the CSS Extractor tool can be used to quickly pull css classes from your site’s markup, specifically with the WordPress comments, that are generated dynamically.
Quick Posts is Fixed! Download the newest version. Quick Post enables a WordPress user to quickly add multiple posts or pages at once. Version 1.3 has the following features: Specify whether content to be added is a post or a page If Pages are added, user can specify Parent Pages (to add children) User…