Jul 15

Sometimes a wordpress plugin is not the proper solution for an complex application. You might want something to work alongside wordpress instead. One of the nice features of Worpress is the user managament. The WordPress documentation for this is non-existant as far as I ca tell, so here’s how you can quickly have your software find out if a user is logged in outside of WordPress. Read the rest of this entry »

Jun 30

You ever get an error like this from your feeds generated by WordPress?

XML Parsing Error: XML or text declaration not at start of entity
Location: http://www.yoursite.tld/utils/test.xml
Line Number 2, Column 1:<?xml version=”1.0″ encoding=”UTF-8″?>

Somewhere along the line a new line was being placed before the XML declaration in the feeds. This caused an error to display in Firefox and other browsers instead of the feed. Read the rest of this entry »

Jun 4

I was having some issues adding sub-categories that had duplicate names, but unique slugs. I don’t know if this is a bug or a feature, but since the slug is the unique key, it doesn’t make sense to me why you couldn’t be able to have duplicate names if the slug is unique. Anyways, here is a hack, not a plugin, so you’ll need to fix it again if you update WordPress. Read the rest of this entry »

Jun 3

In the previous articles, I used a PHP shortcut to display variables. Just like this:

<?=$variable?>

That method, although very friendly and quick, is deprecated, so you should get used to doing this instead:

<?php echo $variable; ?>

I’ll keep you posted if I com up with anything else.

Jun 3

As I mentioned in my previous post, there are some old deprecated things here, I’ll update later.

You now know how to create and display variables with PHP. Here is a review of everything I’ve used so far.

How to break in and out of PHP:

  1. <?php
  2. //PHP Code Goes Here
  3. ?>

How to set a variable:

  1. <?php
  2. $variable = "Variable Value";
  3. ?>

How to quickly display a variable:

  1. <?=$variable?>

Now we are going to use “if,” “else,” and “echo” to set default values for the title, and meta tags. There won’t be a step by step process for this one, I’m just gonna display the sample code for header.php. Everything else is done almost exactly the same as Part 2. Read the rest of this entry »

Jun 3

This is an older tutorial and contains deprecated PHP code. I’ll revisit this in the near future to elaborate.

PHP is great because not only will it allow you to insert files like SSIs, it allows you to easily pass variables on to them such as a page title (your server must support PHP for this to work). You don’t need to know anything about PHP to use this. This example will show how to do this and pass on individual page titles, descriptions and keywords. Read the rest of this entry »

Jun 3

Originally posted on the Steel Dolphin Forum a long long time ago.

Many of you know how to use Server Side Includes, and PHP/ASP. I am going to go over a few uses of these that make your life easier. You do not need to already know how to use these though.

The first rule to making your life easier as a web designer is changing as few files as possible when you need to make a change. That is why we use a separate CSS and JavaScript file, right? This all can be applied along with one of the philosophies behind XML, keep style separate from content.

This is very easy to do with Server Side Includes. How? Here’s the steps. (Your web server must support Server Side Includes)

Read the rest of this entry »