Outside the Wordpress standards

Like I said earlier I love the wordpress cms but I needed some flexable way to make sites that look like sites and not as blogs. One of the thing I needed was a way to place every category on the homepage with images and a url but only the categories that I wanted.

So what I came up was a piece of code and a standard setup of my categories. I changed the setup pages so at install I would have a category with id 1 with name products. The category news and links were inserted also automatic. Next I inserted the other categories by hand as a child of category 1.

In the code of the homepage (home.php) I have this snippet

$cat = $table_prefix . “categories”; $opdracht = mysql_query(”select * from $cat where (category_parent=1)”); $num_rows = mysql_num_rows($opdracht); $i = 1; while ($B = mysql_fetch_array($opdracht))

Next I have the display of each and every category.

A first start of sites that I made is fi www.fitnessapparatuurwinkel.info there are some things not set yet and this was the first where I didn’t work with all the code I have included in my template right now.

I will make some new sites and will have a link here to it when they are ready.

Leave a Reply