I Broke My WP

All the WordPress I learned by _doing_it_wrong()

  • wtf is this
  • Wordpress Design Agency Themes
  • Follow @ibrokemywp

Recent Posts

  • Try to not suck at JavaScript. Store selected DOM elements for re-use
  • Beware when injecting yourself into the loop
  • wp_star_rating(). Be lazy. Be very very lazy
  • register_post_type() cheatsheet from Justin Tadlock
  • Please please please please please turn WP_DEBUG on
February 3, 2015January 29, 2015 by Nate

Check serialised values when updating your database

  • Uncategorized

If you’re switching the URL on your site, like going from dev.site.com to www.site.com, it’s not enough just to search/replace the url. Continue reading →

January 27, 2015January 3, 2015 by Nate

Store options as a serialized array

  • Uncategorized

If you’re putting options into the wp_options table, don’t store every one in it’s own row. Continue reading →

January 20, 2015January 3, 2015 by Nate

WPML translations are always always always strings

  • Uncategorized
  • 2 Comments

If your comparisons match variable type ( === ), this can cause compatibility issues with WPML. Continue reading →

January 13, 2015January 3, 2015 by Nate

Don’t count on that hentry class for your rich snippets

  • Uncategorized
  • 2 Comments

If you’re using Schema.org markup on a piece of content you may want to wrap it in a “hentry” CSS class, even though it should be included in post_class(). Continue reading →

January 6, 2015January 7, 2015 by Nate

Play nice when sorting via pre_get_posts

  • Uncategorized
  • 2 Comments

Try not to override other requests that might be hooking in if you don’t absolutely have to. Continue reading →

December 30, 2014December 6, 2014 by Nate

Dear god, please do not fuck with PHP’s default timezone

  • Uncategorized
  • 1 Comment

WordPress will get seriously pissed off at you. Use current_time() and WordPress’s timezone setting instead.
Continue reading →

December 23, 2014November 30, 2014 by Nate

Applying the_content filter inside the_content filter causes lots of tears

  • Uncategorized
  • 2 Comments

That was my actual commit message.  Continue reading →

December 16, 2014December 16, 2014 by Nate

Use your plugin or theme slug as the textdomain, not whatever other stupid idea you might have

  • Uncategorized
  • 1 Comment

This one seems obvious in hindsight. Why on earth did I not use the plugin slug as the textdomain? Continue reading →

December 9, 2014November 30, 2014 by Nate

get_current_screen()

  • Uncategorized
  • 1 Comment

get_current_screen() will return null if it’s called during an ajax request. Continue reading →

November 13, 2014 by Nate

Hello world!

  • Uncategorized
  • 1 Comment

Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!

Posts navigation

Newer posts
Proudly powered by WordPress | Theme: editor by Array