“You Want Me to Design What?” Recap

Monday night the user group meetup welcomed Kory McDow, owner and designer at Certified Square, to talk about HTML, CSS, and what the heck to do with them on the web. We had almost 70 people show up from our rough head count. One of the largest crowds yet, which was awesome!

Kory started out by laying the foundations for how the web works. None of the technology is any good, though, without content. Websites are based on content and you have to have it before you do anything else. Once you have your content in place it’s presented to the browser through HTML and CSS. Using Kory’s analogy, HTML is like a “bare house.” It defines the structure. CSS, on the other hand, is what gives the house its style. It’s the paint, color, flooring style, and more.

HTML is composed of various structural tags. There’s the p tag for content, h1 through h6 for headings, a for links, ul and li for lists, and finally img for images. These tags are globally applicable so HTML looks the same to developers all across the world. Those tags set the structure for your page.

With the structure in place you can dive in to making it look how you want. A plain HTML page will still display without CSS but adding styles gives your page “flavor.” Here’s an example of what CSS looks like:

p {
color: #f08;
font-size: 16px;
}

That can look intimidating at first but as Kory stepped through it step-by-step what you have is the CSS telling your browser, “For all paragraphs set the color of text to hot pink and the size of text to 16 pixels.” You can define as many properties (font-size, color, margins, padding, etc.) as you like per selector (p, h1, img, etc.).

Some other great tips from Kory’s presentation included:

  • Using Chrome’s built-in web inspector is great for modifying CSS on the fly
    • Hit Apple + option + I to launch the tool. Or, you can hover over the page element (e.g. the heading you want to change) and right click. Then select “Inspect Element.”
  • Themes can be edited on WordPress.com through the CSS editor.
  • colourlovers.com is a good resource for colo(u)rs.
  • It is important to know what selectors take precedent over other selectors otherwise changes won’t be respected. This guide can help. 🙂

New Location Starting Today: Pine Room at the Lincoln Building

Breaking news! Starting with today’s user meetup, we have a new location: the Pine Room at the Lincoln Building.

Fortunately, it’s literally across the street from the Bancorp Tower. You’ll want to enter on 5th street through the door next to the USPS office (206 SW 5th Avenue).

Be sure to tell your friends. We’ll have someone posted at the Bancorp Tower for those who miss the announcement.

Master the Rewrite API Recap

Last night, the Developer Meetup welcomed Daniel Bachhuber (@danielbachhuber), code wranger for WordPress.com VIP, to talk the group through WordPress’ Rewrite API.

Daniel started out asking the room how many thought the rewrite API was a deep, dark, mysterious thing. Many agreed with that, no one thought it was easy. One of the first tools mentioned was the Rewrite Rule Inspector plugin. Daniel wrote this to lessen the pain of adding rewrite rules to WordPress.com VIP sites. He spent about a month and a half diving in to how the API works and out of that came this awesome plugin. The point of the plugin is to show you how WordPress interprets different URI patterns.

In general terms the rewrite API allows you to programmatically specify new, custom rewrite rules. There are some core rules that exist on all new WordPress installs and the API allows you to extend this. It takes human readable URIs and turns them in to query strings that WordPress can understand.

The first step in this is your .htaccess file if running Apache. If you’re on Nginx you’re on your own to configure that. The Codex lists the default .htaccess rules. From there Daniel talked about parse_request. This is the handler that translates the request URI in to query variables that WordPress can understand. It uses regex to match the URIs so it may look messy. 🙂

Daniel also covered some lovely API functions. He covered register_taxonomy, add_rewrite_rule, add_rewrite_endpoint, and add_feed. All of those are detailed in the Codex.

Another tool mentioned to help with all of this was the Debug Bar plugin. With this plugin you can see how many queries were made, how WP interpreted the URI, the SQL WP ran to generate the query object, and the query object. Neat stuff.

The key takeaways Daniel outlined were:

  1. Pay attention to priorities: More often than not your problem is that one rewrite rule is conflicting with another and getting matched before you want it to.
  2. When in doubt, step through the code: Trace the execution path and see how WordPress is interpreting that at different stages.
  3. Canonical redirect is the cause and solution to all of your problems: What can happen is a new rewrite rule you create still redirects you to another page. The canonical redirect takes the data it can see and falls back to the “proper” post.
  4. Flushing rewrites on the plugin activation hook happens way too late: Best pattern is to a) show an interface, admin nag that says “Visit Settings > Permalink” or b) instead of flushing on plugin activation flush on the next admin page load.

Find a Local WordPress Developer with our new Directory!

Looking for help with a site launch or redesign? Maybe you want a custom plugin built? Look no further — we now have a directory for you!

Our directory has some of Portland’s best WordPress developers, designers, trainers, and consultants. We want to make it easier for you to work with Portland-area WordPress experts and would love to hear if you sign someone up.

Developers and designers: don’t see your name on the list? Get in touch — we’ll be happy to help promote your business.

Two Meetups for January: Master the Rewrite API and an Intro to HTML & CSS

This coming month we have two great meetups scheduled. The first will be geared towards developers, and the second will be more for everyone. The formats will be pretty similar — presentations for the first half with mingling and general collaboration following after. Both will be held in the swanky Bancorp Tower conference room.

Oh, and did I mention? We’re looking for food and drink sponsors. If you or your company would like help foster the community in a low-cost, high-value way, we’d love to hear from you.

Master the Rewrite API

Date & Time: Monday, January 14th at 6:30 pm

You think you know the Rewrite API? Think again!

Rewrite rules turn request URIs (e.g. /2012/10/13/i-ate-an-apple/) into query arguments (e.g. year=2012&monthnum=10&day=13&name=i-ate-an-apple&page=) that WordPress can understand. The Rewrite API is close to, but not exactly, like turning lead into gold. And almost as powerful.

In this meetup, Daniel Bachhuber will take us through the ins and outs of the Rewrite API, as well as some common use-cases / pitfalls.

You Want Me to Design What? My Word!

Date & Time: Monday, January 29th at 6:30 pm

Odds are, if you’re using WordPress, then you could benefit from knowing some HTML & CSS.

Wait, what’s HTML & CSS? Come to this meetup to find out!

Kory McDow, web designer at Certified Square, will take us through introductory HTML and CSS so you can modify the feel of your WordPress theme with ease. We’ll cover topics from adding links and inserting images to changing the font size and background images. We’ll also sprinkle in some tips, tricks, and resources so you can easily change the design of your own WordPress-driven websites. Instead of saying, “My Word!”, you’ll leave saying, “My WordPress!”


RSVP for either or both on our Meetup page. Hope to see you there!