Articles in the PHP Category

Display the Subcategory Without the Parent Category
Posted in Display, PHP on 17 July 2008

Many people on the Wordpress.org support forum are asking how to do this.
Here is the simple solution I came across. It will allow you to display the title of a child category without displaying the parent category.
Put this code in your template:
PLAIN TEXT
PHP:

<?php

$category = get_the_category();

echo $category[1]->cat_name;

?>

(Adapted from this code at Wordpress.org.)
The [1] [...]

Redirect Case Sensitive URL Using mod_rewrite and PHP
Posted in Featured, PHP, URL on 20 June 2008

In Wordpress you may have noticed that the page slug defaults to lower case letters. I have learned that it does this in order to prevent potential problems or conflicts between Windows, Linux, and different browers.
Unfortunately, this can also cause problems.
For example, a user recently tried to visit Metro-East.com/bloggers by typing Metro-East.com/Bloggers into the [...]

Display RSS Feeds From Another Website Using PHP
Posted in Display, Featured, PHP, RSS on 28 May 2008

In this article I will show you how you can add RSS feeds from other websites to your Wordpress website using only a few simple lines of PHP code. No plugin is required.
This ability has got to be both one of the most sought-after Wordpress solutions and one of the least-documented. I will [...]

Display Posts: Limit Number, Limit Categories, and Include Excerpt and Thumbnail
Posted in Display, Featured, PHP, Posts on 28 May 2008

If you look at the front page of Metro-East.com you will see three short blog excerpts on the right side. There may not seem to be anything special about these excerpts but there are actually a few interesting things going on here. I have seen questions about this technique on other blogs so [...]

Display the Oodle API with Wordpress using Custom Fields
Posted in API, Admin, Display, Headline, Oodle, PHP on 23 May 2008

There is very little documentation available on the Oodle API. The official Yahoo discussion group is useful to an extent but there isn't much going on over there. There is, however, some decent documentation at the Oodle developer center.
*Disclaimer: I am not an expert programmer. Far from it- everything I've learned [...]


Recent Posts

Recent Comments

Archives