zui: WordPress Development

Notes, thoughts, tips, reference, and discussion about all manner of WordPress web design and development

Articles and ranting about WordPress design and development

always_add_more_link_to_excerpt

WordPress Snippet: ALWAYS show a “read more” link using the_excerpt()

Anyone who has developed a custom theme for WordPress is probably familiar with the inconsistencies of dealing with excerpts, sometimes called “more teasers”. The problem stems from the ability for the blog/site owner to be able to create excerpts in three ways: Manually type a specific excerpt using the “excerpt” data field Use the nifty “more tag” to indicate a beginning portion of the article as the excerpt-more-teaser Or do nothing at all and have them auto generated from the first few hundred characters or so And then as the theme developer you have two main (default) ways of displaying[...] | read on »
backwardscompatibility

Backwards compatibility in web development is silly!

Fed up with ten year old draft specs and DO NOT TRY THIS AT HOME warnings from other web professionals I make a perhaps infallible argument for why you should be using all the latest browser technologies (and every browser version older than a month and the people who use them can go to hell). | read on »
jedit-screenshot

Looking for “LTR” with designers and client/project managers

I am in middle of restructuring my professional services to focus entirely on PSD to CSS (design to markup/template conversion) services and new site and plugin development for WordPress. I want to stop doing design work altogether and ultimately have a handful of incredible designers capable of high quality fast turn around and/or mindblowing quality and concepts  at reasonable rates who can help me push the limits of WordPress development in particular. My goal is to become a WordPress “rockstar” providing services for smaller companies and organizations especially those with some concept of values and ethics that enables a more sustainable[...] | read on »
blog-error

WordPress plugin developers: please debug ;)

I like to run my development server with full error notices and WP_DEBUG set to TRUE. Unfortunately a lot of plugins have various E_NOTICE error messages and WordPress deprecated function calls. So while I am trying to make sure my code is error free it often makes it impossible to use the WordPress admin or reasonably develop my own projects due to the quantity of errors being output all over. See the Codex and Theme/Plugin Review for tips and best practices. Please?!?!?!? Thank you. End gripe ;)
jedit-screenshot

Global variables and understanding scope in WordPress

If you are a developer who understands scope, variables,  functions, and classes you can just skip the “confusion” and go right to the experimental/hypothetical hack to make any variable set in functions.php globally available to your templates (or the WHY if you want to hear me pontificate). Confusion with global variables in WordPress If you set a variable in function.php it is in the global scope (because functions.php is included in wp-settings.php on lines 260-264 in the global scope): HOWEVER, it is not available to all of your templates because unlike functions.php they are loaded by a function putting all[...] | read on »
jedit-screenshot

WordPress conditional functions is_page() and is_page_template() won’t work in the loop

Various conditional functions in WordPress are dependent on global variables. Thus when you start looping over posts (The Loop, any The Loop you do on the page) many of those global variables are reset temporarily per post being output in The Loop. Because of all this global variable shuffling conditional tags such as is_page() and is_page_template() will not function properly. Further, if you want to use any of the conditional functions after The Loop has completed it is imperative that you execute wp_reset_query which presumably rewinds a bunch of arrays and resets the global variables WP needs to the state[...] | read on »