Nothing happens when launching Dreamweaver CS5 on Mac

   Posted: June 3rd, 2010    By: Devin Walker   

So I recently started using a Mac at work and with the Adobe Creative Suite 5 just released I was pretty excited. The new additions to CS5 are great and I can see that working with WordPress will be a lot more streamlined. Anyways, I ran into a frustrating issue that a lot of other Mac/Dreamweaver CS5 users are encountering where launching the program results in a disabled dreamweaver.

Read the rest of this article »

Modern Web Font Options for Web Designers

   Posted: June 1st, 2010    By: Devin Walker   

Google’s new Font API, Cufon, @font-face, sIFR, FLIR…?! It’s 2010 and the Internet has long since evolved to become an integral part of modern society. As web designers, our web fonts used to be limited to a small number of ‘safe’ font-families. Today there are a number of options that allow web developers to break free from the confines of the limited ‘web-safe’ font spectrum and express themselves, and their websites, more individually with unique fonts. Let’s examine how the web’s top font solutions work and how they are implemented.

Read the rest of this article »

Link separators for wp_list_pages() code snippet

   Posted: May 28th, 2010    By: Devin Walker   

WordPress makes it very easy to dynamically create menus from pages and categories with the use of the function wp_list_pages() and wp_list_cats()... but what if you want to have separators in your menus? Here's a bit of code that will do just that:

wp_list_pages Separators

$args = array(
  'sort_column' => 'menu_order',
  'title_li' => '',
  'depth' => '1',
  'echo' => 0
);
$separator = ' | ';
$pattern = '/(<\\/a>).*?(<\\/li>).*?(<li)/is';
$replace = '</a>' . $separator . '</li><li';
$subnav = preg_replace($pattern,$replace,wp_list_pages($args));
echo $subnav;

Please note: I got this code from Rares Comes (very nice lavalamp menu there)

2 comments

Posted in PHP,Wordpress

Tagged with ,

WordPress List Subpages Even if On Subpage

   Posted: May 25th, 2010    By: Devin Walker   

I'm building a new site and the navigation on it requires me to use a different bit of code for parent and child pages. I thought I'd share the code for those out there building a similar navigation. Here's a handy bit of code that you can use to display all subpages on a subpage. For instance, you have your pages setup like so:

Page: Fruit
subpage: Banana
subpage: Apply
subpage: Orange

On Parent Page

If you were wanting to show a navigation menu of all subpages in the Fruit category you could use the following bit of code:

<?php
  $children = wp_list_pages('title_li=&child_of='.$post->ID.'&echo=0');
  if ($children) { ?>
  <ul id="mainNav">
	<div id="locationsNavHead">choose a product</div>
  <?php echo $children; ?>
  </ul>
<?php } ?>

On Subpages

For child, or subpages, we could use the following bit of code:

<div id="sidebar">
<?php
//list subpages even if on a subpage
  if($post->post_parent)
  $children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0");
  else
  $children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0");
  if ($children) { ?>
  <ul id="mainNav">
  <div id="locationsNavHead">choose a product</div>
  <?php echo $children; ?>
  </ul>
<?php } ?>
</div>

If you are confused at what this all means please comment below and check out wp_list_pages() over at the WordPress Codex

3 comments

Posted in HTML,PHP,Wordpress

Tagged with

Forget about using @font-face thanks to Google

   Posted: May 21st, 2010    By: Devin Walker   

Web designers beware that if you're eager to use @font-face in the near future you can forget it! With Google now entering the web-font market the guys over at font-face.com decided it was a lost cause to continue on their noble quest. Personally, I would be rather upset if I had invested 100s of hour of labor just to be overtaken by a giant. Hopefully Google will kick them over some pity capital.

Say Goodbye to font-face in web design Read the rest of this article »