If you read my other post about WordPress Meta Boxes you know I was adding multiple ones to my custom post_type edit page. Well, I also wanted users to be able to use the TinyMCE Rich Text Editor in those boxes if they wanted, and (just like the regular compose box) be able to toggle [...]
Tips, Tricks & Hacks
WordPress Meta Boxes + Rich Text Editor + Mode Switch Tabs
WordPress Custom Post Type Multiple Meta Boxes
I’m writing this post because this really confused me at first. There are some other examples online that maybe, if you’re here, you’ve already found: http://www.farinspace.com/how-to-create-custom-wordpress-meta-box/ http://shibashake.com/wordpress-theme/add-metabox-custom-post-type http://codex.wordpress.org/Function_Reference/add_meta_box I think the main reason I was having trouble wrapping my head around it all was because the samples use so many similar names for each part [...]
Selectively Strip/Show WordPress Shortcodes
In the WordPress Codex where it talks about the “strip_shortcodes()” function it includes this example of how to selectively disable shortcodes on the Home page but show them elsewhere: 1234567function remove_shortcode_from_index($content) { if ( is_home() ) { $content = strip_shortcodes( $content ); } return $content; } add_filter(’the_content’, ‘remove_shortcode_from_index’); But the [...]
WordPress shortcodes that only work on a custom post_type page
My WordPress plugin creates a custom post_type and the custom page which uses that post_type displays regular posts (of post_type=”post”) filtered to only show those that have been assigned to the same Category as the custom post_type page itself. Then I created a custom shortcode intended to run Javascript code that is ONLY loaded on [...]
Media Queries: Fool’s Gold or Not?
When I first started working on a web app project I had never worked with CSS “Media Queries” before. One of the blog posts I found online about how they work was this one: http://www.cloudfour.com/css-media-query-for-mobile-is-fools-gold/ The author argues that CSS Media Queries are “Fool’s Gold” because they don’t really deliver the optimizations for mobile that [...]
Arguing with Event Handlers
I’ve been beating my head against the wall for days now trying to find the magic combination that will let me send dynamic parameters to my event handlers. Here is my polymorphic event handler: 1234567891011121314var addEvent = function ( obj, type, fn ) { if ( obj.attachEvent ) { addEvent = function ( obj, type, [...]
Scrolling List with Tap-to-Select
If you’ve used an iOS device you’ve seen lists that you can touch scroll and then tap to select an item on the list. I wanted to reproduce that native behavior with web coding. But the web site would be accessible to more than just iOS devices. The first way I got this to work [...]
restoreDefault();
While there is a stopPropagation() option to prevent events from bubbling up, for some bizarre reason there is nothing you can do to stop the event (or in this case the default prevention) from being applied to all the selected element’s children. And while there is removeEventListener as a counter to addEventListener, there is no [...]
Media Queries for Android
Media Query and You Shall Receive There are plenty of resources online talking about using “media queries” in your CSS to deliver sites optimized for the iPhone or iPad. But what about Android? Not a whole lot that I could find. I spent most of a Saturday methodically checking a simple web page in a [...]
iPad & Background Images
This is kind of annoying. I’m working on a project that has to work well on an iPad, so I’ve been checking things with the iOS Simulator and the iPad refuses to deal with full-coverage background images properly. To clarify, it will position a background where you tell it, it will tile a background how [...]

Customized for Mobile Devices | Powered by