19 Jan 2008

I’ve searched long and hard trying to find a way to add the page name to the title tag dynamically to my WordPress blog page when I’m using WordPress as a CMS. I finally found the solution that I was able to understand at ‘Web Designer Wall.’ I changed his code a bit to suit my own needs and thought I’d paste the code here for anyone who may need it (and as a repository for me for future use).

The following PHP code should be placed between your title tags in the header.php file.

  1. < ?php
  2. if (is_home()) {
  3. echo 'News - Pop Stalin Design: Web Design With Standards'; wp_title('');
  4. } elseif (is_404()) {
  5. echo '404 Not Found'; echo ' - '; echo bloginfo('name');
  6. } elseif (is_category()) {
  7. echo 'Categories - '; echo wp_title(''); echo ' - '; echo bloginfo('name');
  8. } elseif (is_search()) {
  9. echo 'Search Results'; echo ' - '; echo bloginfo('name');
  10. } elseif ( is_day() || is_month() || is_year() ) {
  11. echo 'Archives - '; wp_title('');
  12. } else {
  13. echo wp_title(''); echo ' - '; echo bloginfo('name');
  14. }
  15. ?>

This code seems overly verbose to me but until I can figure out something more concise, this is what I’ll be using.

16 Jan 2008

A mailing list I subscribe to, Women Designer’s Group, one of the women briefly spoke about using WordPress MU for client development. The MU stands for ‘Multi-User’ and so it struck me as a brilliant idea. I’m thinking about implementing it in the near future since I do so much WordPress theme development work. Hell, it’s what Wordpress.com is powered with.

WordPress MU Features

  • Everything WordPress does
  • Scaling to tens of millions of pageviews per day.
  • Unlimited users and blogs.
  • Different permissions on different blogs.

What do you think? Pros, cons; is this a viable solution? I’m not super familiar with the admin side of MU, although I do know that it’s basically WordPress with MU wrapped around it for administration.

14 Jan 2008

While toiling away on a redesign for the business side of my site last night, being the Mac geek that I am, I was listening to my iPod through my Powerbook in iTunes; I know, not necessary information but I just wanted to point out how much of a Mac geek I am. So I’m working on the redesign, okay, I was actually surfing the Net avoiding working on the redesign when Rage Against the Machine came out of my speakers. I of course did the only thing any sane person would do when that happens, I threw up the metal, \m/, and moved my head in time with the beat—by the way, my cats, who think I’m very odd to begin with, are now convinced of my oddity. Anyway, a conversation I had with my aunt in my early twenties came back to me. I recall asking her why she started listening to country music being a child of the sixties and all. She proceeded to tell me when you hit your mid-to-late thirties you start to “outgrow” rock & roll because “it’s too loud.” As if! In a couple of weeks I’ll be hitting my mid-to-late thirties marker and as I’m sure many people do when their birth-day nears, I became introspective.

Of course that introspection made me start thinking about my age and the perception of hip designers. Am I growing too old to be considered hip? Am I like those people, mainly women, you see in their retirement years wearing clothes that look like they were purchased in the Junior’s department (for unknowing folk, that’s teen girls)? Then I began to panic when I thought about all the things that have a shelf-life; canned goods, cereal, candy—hell, even Twinkies have a shelf-life, so, do designers? I have no other tangible skills and I can’t see myself ever working in a factory or retail again but I have to wonder, will it some day come to that? What are your thoughts—do designer’s have a shelf-life and how long before we all reach it?

And for the record, I am not switching to country music any time soon. I listen to the occasional alt/country music but that’s different, it’s hip.

14 Jan 2008

In WordPress sometimes you want a different look for different categories. It’s fairly easy to accomplish with a little coding and creating custom page templates.

Code for Page Template File

The only necessity for using a Page Template is the below code. Just place it at the top of the page template you are creating. A good point of reference to see how a Page Template is handled is by looking at the file ‘archives.php’ in your theme. It’s usually the second ‘Archives’ link in the theme editor for the default WordPress theme.

  1. < ?php
  2. /*
  3. Template Name: Custom Category
  4. */
  5. ?>

Code to Call Unique Templates

The below code should be placed at the top of ‘category.php’.

  1. < ?php
  2. $post = $wp_query- >post;
  3. if ( in_category('3') ) {
  4. include(TEMPLATEPATH . '/cat3.php’);
  5. } elseif ( in_category('4') ) {
  6. include(TEMPLATEPATH . '/cat4.php');
  7. } else {
  8. include(TEMPLATEPATH . '/cat.php');
  9. } ? >

As always you can find out more about creating themes and template tags at the WordPress codex.

Page 4 of 32« First...«23456»...Last »

About Me

My name’s Jen; I’m a cynical, sarcastic, ex-drummer who is fond of dark humor. I've held way too many factory & retail jobs but finally found my calling one Christmas holiday in a dark, musty basement. I am now a CSS & XHTML web standards looney and can be found daily—when I’m not at my Mac—at the local fair-trade coffee shop buying an iced-soy mocha no matter the temperature.

I am also the owner of Pop Stalin Design specializing in CSS & XHTML web design as well as custom WordPress themes.