Posts Tagged ‘template’

Google Analytics: Inserting Into a Wordpress Template

Saturday, March 29th, 2008

Google Analytics is a great tool for gathering data about your website. You can track and analyze all kinds of data about your visitors, their navigation paths, and the effectiveness of your content.

To use Google Analytics, you need to place some javascript on your website. A commonly asked question in forums is, “How do I add Google Analytics to my Wordpress template?”
(more…)

Anatomy of a Wordpress Template: The Basics

Monday, March 10th, 2008

There are tons of free Wordpress templates available, but at some point you’ll probably want to modify one or make your own. Even if you know HTML pretty well, this can be a daunting task at first.

Wordpress templates have a decent amount of simple PHP mixed in, and you need to utilize a special file structure for the template to operate correctly. Before you dive into making a Wordpress template, let’s look at the basic structure of a Wordpress template compared to a normal website template.
(more…)

How to Time Delay Posts in Wordpress

Saturday, March 8th, 2008

One reason I’ve heard people say that they prefer a full-blown CMS to Wordpress is that Wordpress doesn’t allow time delayed posting. I was about to figure out a way to mod Wordpress to make this possible – until I realized that there is some decent built-in functionality for time delaying.

You can easily delay the release of your posts into the main indexes (front page, archives, “Recent Posts” list, etc). With a little bit of code, you can also restrict people from viewing the page before its appointed “Published” date.
(more…)

Add Custom Loops (Queries) to Wordpress

Sunday, March 2nd, 2008

If you look at your Wordpress template, the thing that drives your page is called “the loop.” That’s Wordpress speak for looping through the result set (the posts) retrieved from the database.

If you wanted to make custom queries, you could certainly do that by diving straight into the database. However, Wordpress comes with some built in functions for helping you query the database and display the results. By using these template tags, you can add custom loops in your template to display other post information.
(more…)

How to Alternate CSS Styles Using PHP

Wednesday, February 13th, 2008

There are a lot of situations in which you’d like to alternate CSS styles from one element to the next. Long tables, for example, look a lot nicer when the background color of the rows is alternated.

How do we do that? Some pretty simple PHP can help you accomplish this task and spice up your HTML/CSS.
(more…)