Posts in the Wordpress How-To's Category


How to Exclude a Category from the WordPress Loop

Here’s the question that was asked:
“Basically I want to take all of the posts in the “Freelance” category and remove them from the main content so that I can link to them from a page instead of including them in the Loop. ”
Here is the code to exclude an entire category from appearing within the [...]

Read More »

Posted on July 23, 2009 in Wordpress How-To's and has been tagged as .


Great Grand Parent ID’s in WordPress

Have you ever needed to find all the ancestor ID’s of a page in WordPress? If so, you’ve come to the right place. Here’s some quick code to give you up to the great grand parent ID.
$current = $post->ID;
$parent = $post->post_parent;
$get_grandparent = get_post($parent);
$grandparent = $get_grandparent->post_parent;
$get_greatgrandparent = get_post($grandparent);
$greatgrandparent = $get_greatgrandparent->post_parent;
echo “parent = $parent; grandparent [...]

Read More »

Posted on July 10, 2009 in Wordpress How-To's and has been tagged as .


Style WordPress Titles Based on Number of Letters

A common problem that I’ve encountered – how to control dynamic text based on how long it is. In this case I had titles ranging from 10 characters to 25 characters – this includes spaces. The goal is to make them centered regardless of how many letters and spaces are in the title.
Here is an [...]

Read More »

Posted on July 8, 2009 in Wordpress How-To's and has been tagged as , , .



Categories

Services I Offer

About Me

Andy Weigel

My name is Andy Weigel and I'm a web developer and designer in Pittsburgh, PA.

I focus on combining design with technology to build compelling, creative, easy-to-navigate web sites and custom web applications for organizations and businesses of all shapes and sizes. My specialty is WordPress. And most of all, I love what I do!

On Twitter