Posted by dylan on May 7, 2012
Since I started building frontend templates and WordPress themes, I’ve been collecting my own bag of tricks and reusable code snippets. Now at long last, I’ve put them together and gotten them up on the web. Introducing Bedrock – a simple base theme for WordPress web development. There’s a few different parts to this:
Posted by dylan on May 4, 2012
WordPress offers the enqueue_scripts feature, which allows theme developers to carefully manage their script dependencies and versions. Here’s the syntax: First your register your script – <?php wp_register_script( $handle, $src, $deps, $ver, $in_footer ); ?> Then enqueue it, and pass it the handle that you gave it: wp_enqueue_script( $handle ,$src ,$deps ,$ver ,$in_footer );
Posted by dylan on April 28, 2012
WP Lipsum is a simple plugin for generating dummy text/style guides for your WordPress site, using fake “lorem ipsum” text and dummy images. This intended for use by theme developers and project managers while building out sites. http://bedrocktheme.com/wp-lipsum
Posted by dylan on April 24, 2012
Displaying post excerts in WordPress can be surprisingly confusing. Here’s an explanation of the options. WordPress Default Excerpts A WP post lets you define the main content, and an optional excerpt. By default, pages do not offer excerpts, but you can change that.
Posted by dylan on April 12, 2012
Integrating Paypal into a website is kind of a pain. The technology works. And the documentation is out there. But it’s buried within their maze of a website without very much high level explanation. But after some poking around, I found what is basically the simplest way to get Paypal info back to your website, [...]
Posted by dylan on April 10, 2012
WordPress is a pretty amazing platform but it can be a little overwhelming at first. The WP Codex has a wealth of information, but it’s not always organized the best (or completely thorough, for that matter). Here’s a list of my essential WordPress resources, from inside the Codex and out. Hopefully these help guide you [...]
Posted by dylan on April 8, 2012
It’s surprisingly easy, just 2 lines lets us put on a disguise and start digging into WordPress: define(‘WP_USE_THEMES’, false); require(‘../wp-load.php’); That’s it! (Replace the path to wp-load with the path to your WordPress root.) After loading these files, you can query WordPress as normal and do whatever you want with all the juicy post data. [...]
Posted by dylan on March 28, 2012
Today I had a chance to do “output buffering” with PHP. Output buffering allows us to “capture” the stuff that PHP is sending to the screen, for use later on behind the scenes. Output buffering is one of my favorite things to do with PHP, it’s just weird and cool. Also it’s way easy: <?php ob_start(); ?> [...]