Posts Tagged ‘footer’

How do I add the date to my blog?

There are a lot of times when we want to add something as simple as the date to our blog but coding (especially in PHP) can be a bit difficult. Let me walk you through the steps to adding a date to your blog, assuming of course you use WordPress.

First, open your template files such as the footer by loading the footer.php file located in your /wp-content/themes/[theme name]/ folder.

Next, we need to insert a very simple PHP function called date() into your page but before we do that, we need to make sure that we open and close the PHP event. To do this, simply open it using <?php and close it using ?>. The date() function itself requires a formating argument, but luckily we’re not meant to remember them all. They can be found on the PHP date() reference page.

As an example, if you want to show the day of the week that it currently is you could open your website and edit it every day (highly impractical) or you could insert the code <?php echo date(‘l’); ?> into your page. Note that I open the PHP event, place the date() function with the argument ‘l’, indicate the end of a line (;) and then close the PHP event.  Each of these elements are required to properly format the date.

If you would like to show the current year, simply use: <?php echo date(‘Y’); ?> because Y is the symbol for the year. On the other hand, if you’d like to use something more complex, try <?php echo date(‘l jS \of F Y h:i:s A’); ?> which will return something like Monday 8th of August 2005 03:12:46 PM.

Once you’ve saved your footer.php file, simply re-upload it to your server and voila! Now you can set the date using your server and PHP instead of editing files every day! In more practical terms, it is how you can always have an updated copyright notice of your website without having to remember to update it each January.

How do you use WordPress to run a website?

WordPress is a blogging package right? Well if you think that you’re absolutely right but only partially. WordPress, which is most likely the worlds most popular blogging package is also a great piece of software to power small business websites. In fact, I’ve used WordPress to power websites such as:

In all of these cases as well as many, many others WordPress was used to create and manage complex websites which skyrocketed to the top of Google’s Search Engine Results Pages because they used WordPress as a powerful content management tool, making the website much easier to manage and therefore a better tool for busy marketing staff.

How do you use WordPress to run a website?

Actually, that’s the best part of WordPress. Once you’ve signed up for a great hosting package such as Bluehost’s $6.95 per month solution, you can install WordPress by simply clicking their one step installation process and voila! You’re website is setup with the world’s most powerful blogging package instantly.

So then, how do you use WordPress to run a website? Once you’ve installed WordPress you’ll need to make changes to a few key files, called template files. These template files are what control how your website looks to visitors. Here’s what you need to know:

  • The header.php file is what appears on all pages at the top of your page
  • The footer.php file is what appears on all pages at the bottom of your website
  • functions.php is where you store common PHP code to call if from all pages, most often you can ignore this
  • index.php is the heart and soul of your website, technically you can remove all the other .php files and format just this page to make every page on your website look the same.
  • pages.php is used to format content edited in the Pages tab of the WordPress control panel
  • single.php is used to format content edited in the Posts tab, by seperating these two you can format pages (such as About Us or Contact Us) to look different than content pages (such as a press release or CEO blog)
  • categories.php is used to format pages which list posts, archives.php is similar but for tags
  • search.php is used to format the results of a search

Once you’ve changed the look and feel of your website, you can use the built in WordPress editor to allow different members of your team to post content to the website, add marketing or press releases and even adjust prices!

You can get started with your company website today but signing up for a great hosting account, just $6.95 per month with BlueHost.

Montreal WordPress Designer, Chris Bavota

As I often do, I was looking at my friend Chris Bavota’s website this morning for inspiration to write a post about WordPress and it occured to me, why not share with all of you some of the things that I love about Chris’s WordPress website and do a little “review” of it so that others who might wish to create a blog can see some of the great things Chris has done with BavotaSan.

First off, Chris is an independent website developer and creative type in Montreal Canada, his website is all about how to build and design WordPress websites for small business owners and online marketing types, basically the same audience as mine but with a much more technical and WordPress focus.

His website, BavotaSan.com is packed full of amazing goodies such as his free themes for WordPress and a series of premium themes such as the Stationery Premium WordPress Theme , Illustrious Premium WordPress Theme and a great paid WordPress plugin called Delete Duplicate Posts Pro which surprisingly … does just that. It’s great for auto blogging website in that it scans for duplicate posts and ensures you’re not falling victim to Google’s duplicate post penalties but Chris’s website isn’t just a great resource, it’s a work of interface art. Let’s take a look at some of the features of this great website.

The Footer

I always start with the footer when I review a website, it’s often the last place a design thinks to look but the first place somebody looks when they’re lost … so it’s important. Actually, it’s a little like Walmart I think in that most people never think about customer service until they’re standing in line and really upset. Walmart is one of the few national chains that I can think of who put great thought into this fact, when a customer is trying to return or complain about something … make it easy for them, make it pleasant.

The footer on Chris’ website does just that. Finding things easily is a pleasant experience.

the footer Montreal WordPress Designer, Chris Bavota image

You can easily see the links he wants to promote in his footer, as well as a clearly defined link for Twitter.  His downloads and tutorials are organized to be effective and you’ll see this subtle use of a “Back to Top” option with an icon, a small detail often over looked by web designers in a rush. Ironically, Chris isn’t a web designer, he’s a web developer so his attention to detail is refreshing.

The Header

At the top of Chris’ website he promotes his internal links very well using a process we call deep linking but it’s done subtly and doesn’t interfere with users ability to navigate his website. In fact his menu is designed to accomplish two functions. First, he accommodates the users need to quickly reach content and two gives search engines the ability to easily feature content from his site.

the header Montreal WordPress Designer, Chris Bavota image

Two things that I absolutely love about Chris’ website? First, his use of the Get image from post code (he uses the code as a part of his theme rather than as a plugin, which is very effective) and the great link to his RSS feed on the right.

Everybody should take a few minutes to visit Montreal Web Designer, Chris Bavota .

How to exclude yourself from Google Analytics with WordPress

Without data we’re only guessing so it’s critical that we not only have great data to make decisions with but also that the data we do have is as free from corruption as possible. With that in mind if you run a WordPress website and Google Analytics, you’re most likely skewing your data without realizing it by visiting your own website.

To stop yourself from being counted as a visitor, all you need to do is add a simple piece of code to your websites header.php file that will read:

 

[source lang="php"]<?php
if (is_user_logged_in() == 1) {
if (wp_get_current_user()->ID == 1) {
setcookie("analyticsexcludeme", "analyticsexcludeme", time()+3600);
}
};
?>[/source]

Make sure the code is placed above the Google Analytics code (which I always like to place in the footer of my websites anyways). Once this code is placed in your header file, your website is updated but you’re not finished yet!

 

The code is only the first part, it’s what tells Google that you’d like to be excluded but now we need to actually exclude you.

Log into your Analytics account and click Analytics Settings.

Next, open the Filter manager (very bottom right corner).

Finally, add a new Filter with the settings:

analytics exclude me How to exclude yourself from Google Analytics with WordPress imageThis will tell Google to exclude all visitors who have the cookie “analyticsexcludeme” in their web browser, the same cookie we set earlier in the header code section of this tutorial.

Great Chefs Great Restaurant Web Theme

great chefs great restaurants wordpress theme Great Chefs Great Restaurant Web Theme image

Building a great website for your restaurant used to be really hard but one of the wonderful things about working with the great people at Great Chefs Television is that they want to make running your restaurant easier by helping to improve your image with this free website theme for WordPress.

How to use it

Step one download the free template and install it on your WordPress website, it’s really that easy! The theme features a rich, savory graphic from one of the hit TV show’s episodes but you can easily change it to anything you’d like by replacing the photo stored at /images/header.jpg.

Cool Footer

great chefs great restaurant footer Great Chefs Great Restaurant Web Theme image

Along the bottom of this theme, I’ve coded a special loop which checks for the most recent five posts which feature a photo and it displays that photo as a link to your article or menu item.

Please feel free to download this theme for free or preview it here on thisismyurl.com.

Is this the source of swine flu? Also, other cool links today.

swine flu source Is this the source of swine flu? Also, other cool links today. image

I have to thank my friend Chris for that one (not that Chris, the other Chris). Usually I don’t share jokes here on the site but this one cracked me up.  I don’t know if it was because I have kids or what but I almost lost a keyboard when I saw this one.

A quick thanks to Casper for posting a great followup link (15 Common Mistakes that Violate Google Adsense TOS)  to my Make money online with Google AdSense post. For those of you too busy to read it, the TOS for Google states only certain languages are supported. I wonder how many people using the Global Translator plugin even realize their breaking their Google Terms of Service? Also in the same article, Yan told me about WordTracker and Wordpot, two really cool tools for helping you make money online by giving you more details about your keyword choices.

Matt Cutts (@mattcutts) posted a great link to The 2008 Founders’ Letter, while I still think Twitter is pretty lame I do think this is a great reason to be on it. Guys like Matt (who I call the Guru of Google) routinely post tons of amazing content links that help us better understand the inner workings of Google. Speaking of Twitter, Syed posted a pretty cool article this morning called 48 Excellent Examples Of Blog Post Footer Designs that’ll give you a great idea of what to do with that footer.

So that’s it for today, I’m off to do some coding and video work for the day but just a quick note to let you know I’ve updated my WordPress plugins this morning, so Auto CopyrightEasy Technorati Tags for WordPressNo More FramesWordPress.com Stats Smiley Remover and  WordPress PHP Info have all been updated on the WordPress plugins directory. If you have comments or feedback, critiques or compliments on any of my plugins please send them to me, if I don’t hear back from people I can’t work to make them better.

Have a great weekend.

Placing Google Analytics Code in a Dreamweaver Template

This is just a quick tip today, I got out of a training session and realized that a lot of people are still having a hard time understand Google Analytics so here are a few things for you to keep in mind.

First, for Analytics to be effective you need to include the code on all your webpages (not just the homepage). To do this in Dreamweaver, follow these simple steps:

  1. copy the code from your Google Analytics home page
  2. open dreamweaver and edit your template file
  3. switch to Code View
  4. place the Analytics code at the bottom of the file, between the </body> and </html> tags

Why between those two tags?

The Google Analytics code works by calling a remote script from Googles servers. Somethings this takes a bit of time, while it’s loading your webpage might stutter so let’s load all the page and display it to users first.

How to add Analytics to WordPress?

If you’re running WordPress, you can follow the steps above pretty well except in your case you’ll want to edit the footer.php which is found in your wp-content/themes/[yourthemename]/ directory.

WordPress.com Stats Smiley Remover Plugin

When you install the WordPress.com Stats plugin from WordPress it adds a small, simple graphic to your posts which looks like a small smiley face. Generally it’s located in the footer of your theme but no matter how hard you try, you won’t be able to find it (or remove it) from the code.

Why? 

The smiley face is actually being loaded through a series of JavaScript calls from a remote server, the graphic isn’t actually located on your website at all! It’s part of the WordPress.com Stats plugin and is designed to help track visitors to your website but … it’s kinda ugly and a pain in the ass so to get rid of it all you need to do is add some code to your header.php file. Specifically, open your style.css file and add the following CSS:

[source lang="css"]img#wpstats{display:none;}[/source]

If you’re absolutely petrified of opening and editing your CSS files directly you can either pay a WordPress expert to do it for you (that’s the choice that my wife always prefers) or you can download my simple plugin which can be uploaded to your website and activated, automatically adding the code to the proper place.

How to Install

  1. Download the plugin
  2. Log into your WordPress Admin (http://[yourwebsite]/wp-admin
  3. Surf to Plugins -> Add New
  4. Select the ZIP file and Install Now
  5. Activate the Plugin

For those of you who would like to know more about the Smiley Face frustrustration, Ryan Imel wrote a great piece on it a while back and there’s also a great piece on My Digital Life.

 download file WordPress.com Stats Smiley Remover Plugin image

How You Can Help

I love developing plugins for WordPress and do my best to always keep them free but of course it take a lot of time and effort to build these plugins so if you’d like to say thanks, the best way is to take a few moments and write about the plugin on your own website, include a link to my website from your posts or download and rate the plugin on the official plugin directory.

Support forums are now online! If you have any questions, please visit http://forums.thisismyurl.com.

How can you get a free PR5 link to your website?

After much soul searching and a great internal debate about dofollow vs. nofollow I’ve had to stop offering nofollow free links from my website via the comments field. It was a very difficult decision, you’re welcome to read about it here (Why I’ve Decided to Nofollow and How That Will Help You.)

 

People are amazing, they talk about wanting to drive more traffic to their website and increase their presence on Goggle but how many are really up for the challenge? How many people out there truly want to drive traffic to their website and build an online presence? Are you serious about increasing your own PageRank? Well now is the time to find out.

I’ll give every one of you a free link back on the footer of my website (that’s over 5,000 pages) to help you promote your own website, for free. There’s no catch, no tricks and no limitations. You want to build your website traffic and increase your exposure on the internet? It’s yours for free. All you need to do is compete with the other people reading this to earn one of ten top poster comment spots in the lower right hand corner of my blog.

Here’s how it works, every time somebody posts a comment on my website they not only get a link from the specific page on my blog that they’re commenting on but the website also begins counting the total number of posts they’ve made (and I’ve accepted). The top ten each day get listed in the footer of my website for the world (and more importantly Google) to see.

That means that ten people get  more than 5,500 FREE, high quality PR5 links directly from my website to their website for doing nothing more than commenting on my articles, correcting me when I’m wrong or pointing me to other awesome content on the web. Even if you’re not one of the top 10, you still get at least one or two PR5 links from my website to yours just for leaving the comment. 

So how do you know when to comment? Simple, subscribe to my RSS feed, Twitter me or get updates by Email.  Every time I post a new article, you’ll be told and if you can add something to the post, correct one of my many mistakes or point me to a great source for more details … you’ll get a free high quality PR5 link right back to your website.

Generating a Dynamic Copyright Notice in WordPress

Copyright notices are located in the footer of almost every website on the Internet and for good reason, it’s part of what protects us from content thieves or at least in theory but most of our copyright notices are outdated or hand coded, even in WordPress so how do we get around this?

The Current Year

My first solution was to place a small piece of PHP code in the footer of my WordPress file so that it always showed the current year, like so:

Copyright <?php echo date(“Y”);?> Christopher Ross.

Which resulting in:

Copyright 2009 Christopher Ross.

An Earlier Year to The Current Year

That system worked fine but was technically wrong since many of my posts predate 2009, which led me to my second solution of simply posting an earlier date in front of the PHP code like so:

Copyright 2005-<?php echo date(“Y”);?> Christopher Ross.

Still, technically wrong since I had no idea what the earliest post in my blog was and I’m too lazy to search through all the posts to find out. Which led me to the desire a script which would automatically find the first occurrence of a post in my blog and post the results as a copyright statement.

Automating the Copyright notice

To automate the copyright notice, first I needed to establish the first post as well as the last. The following code will accomplish that task:

 

function copyright() {

global $wpdb;

$posts = $wpdb->get_results(“SELECT YEAR(post_date_gmt) AS year FROM $wpdb->posts WHERE post_date_gmt > 1970 ORDER BY post_date_gmt ASC”);

$last = $posts[count($posts)-1]->year;

$first = $posts[0]->year;

 

$c = __(‘Copyright (&copy;) ‘, ‘inove’) . $first;

if($first != $last) {

    $c .= ‘-’. $last;

}

return $c;

}

Simply placing the function in your functions.php file will allow you to insert the code <?php echo  copyright();?> into your footer, resulting in a fully automated copyright notice as you can see on the footer of my website.

For those users who prefer to use a plugin, I’ve uploaded a WordPress plugin version of the copyright tool as well.

WordPress Plugin to automatically update the copyright notice.

What is this WordPress plugin?

This plugin automatically generates a copyright notice from the first post in your blog to the current year. The Auto Copyright notice plugin fetches the first and last year of posts from the database and displays the results as a copyright notice on your website.

This process allows blog owners to add content retroactively, knowing that the  website will automatically find the first date a post is published as well as the last published date or the current year (whichever is later).

To use the plugin, simply download it and add the code  <?php echo  autocopyright();?> to your website where you’d like the copyright notice to appear.

download file WordPress Plugin to automatically update the copyright notice. image

How You Can Help

I love developing plugins for WordPress and do my best to always keep them free but of course it take a lot of time and effort to build these plugins so if you’d like to say thanks, the best way is to take a few moments and write about the plugin on your own website, include a link to my website from your posts or download and rate the plugin on the official plugin directory.

Support forums are now online! If you have any questions, please visit http://forums.thisismyurl.com.

Free WordPress Theme – Pink Flowers

Pink Flower Theme

Pink Flower Theme

I’ve just wrapped up another free WordPress theme for you guys, it’s a clean and simple traditional blog theme using a lot of pink. Some people have previously commented that some of my themes are a little bit less manly than they could be but there’s a reason I choose to do these themes in pinks and blues … because there are not a lot of themes out there in pink and blue.  

As with all my themes, this one is setup to be Search Engine Optimized and makes use of proper title tags, document hierarchy and W3C compatible xHTML / CSS so even if you don’t know a thing about making cool websites, this theme is already designed for you.

Speaking of design, a special thanks to designious.com for creating the awesome flower pattern and to Smashing Magazine for making it available for free.

One other note, this theme makes use of my really cool WordPress technique for showing both icons and text in your WordPress links.

The theme is 100% free, I designed it with an ad on the left hand sidebar but you can easily remove it in the sidebar.php file (it’s even commented) all that I ask is that you don’t change the footer, but even that’s optional. If you’re using it, I’d love to hear from you.

Free SEO WordPress Theme for Small Business Web Sites

As part of my goal to create and upload five WordPress themes that are Search Engine Optimized, I’ve finished my second theme, it’s a simple website design for small businesses.

The purpose of this theme was to create a simple, clean, professional website design for companies who need an online presence without the clutter of a normal blog. It’s not a very exciting theme, actually it’s a little on the plain side but it does feature a simple single column design with widget ready footer and nice big text which will help people read the site.

made for small business 300x300 Free SEO WordPress Theme for Small Business Web Sites imageI’ve also taken the time to include a lot of SEO features for beginner website owners, these search engine tools are built right into the template and will auto generate headers, META and titles suitable for Google to index effectively. It’s an ideal blog design for a church or community group, or a small business on a budget.

You’re welcome to download the template for free. If you like this theme but would like to have it customized or installed for you, why not contact me? I’m available for WordPress consulting, theme customization and freelance development.

  • Download
  • Preview
  • How can you make $500 a month part time from the web?

    So maybe $500 a month isn’t going to let you retire this year but with the economy going down the tubes and our fearless political leaders still assuming that Wall Street will fix itself, it’s time to share a little secret with you … the web really does work.

    Using the method below, I easily make $500 each month from my own web blogs and it’s really pretty easy. I spend about 10 hours a month working on my sites, you can do the math.

    First, you need to cover a few basics in order to get your website up and running.

    1) Select a blogging package

    This is pretty simple really, there are a few out there but WordPress is my personal favorite, it’s super easy to use and even comes with some great looking themes. You can also use something like

    3) Hosting

     

     

    A web host is a dedicated place on the web that you can put your website. Personally I love hosting at BlueHost. They’re wonderful, friendly, helpful and have WordPress preinstalled. They can also take care of your domain name registration.

    4) Analytics

    You’ll want to signup for Google Analytics and insert the code into the footer of your website. Analytics are web statistics, it will tell you who’s reading your blog and where they’re coming from. Remember, without data your decisions are nothing more than guesses … Google takes the guessing away.

    Now that you have the basic pieces of the puzzle, we need to put it all together.

    5) Building your first blog

    First, we need to activate our BlueHost account and log into our account manager. Towards the bottom of the control panel you’ll find a link called Fantastico, which we’ll need to click to install WordPress.

    Fantastico will ask you some questions about what you want to call your blog etc. and when you’re done, it will redirect you to your WordPress blog. It’s really that simple.

    6) Inserting your Google Analytics code

    Now that your blog is running, you’ll need to do some technical stuff for a few minutes. Log into Your Google Analytics account and add your new website. Once done, select Get Code and copy the JavaScript.

    Return to BlueHost and select Design > Edit Theme from your WordPress installation. On the right hand side you’ll see an option for your site Footer. This is the file that appears on the bottom of all your pages, you’ll want to open that file and paste the JavaScript just before the tag in your footer.

    What this has done is installed the tracking scripts on every page your site generates, remember how to do it because later when we change your theme you’ll have to do it again.

    7) Sign up for ad programs

    There are a few great ad programs out there, the most popular of course is Google AdSense but there are plenty to choose from. Once you’ve signed up for some ad programs it’s time to start thinking about where (and how) to place ads on your website. There are aslo some great sites like Commission Junction and wonderful affiliate programs for you to use.

    8) Designing a better website

    There are plenty of great themes out there for WordPress, even the default one is pretty great but if you’re looking to make money from your sites you’ll want to find a good WordPress theme, ideally free. Once you’ve done that simply upload it to your website using an FTP program and activate it.

    Remember, you’ll need to update your Google Analytics code (step 6) in the new template and you should take the Google Adsense code from the previous step and place it in your template.

    9) Start blogging

    Everything before this is pretty simple really, if you can’t do it yourself send me an email and I’ll take care of it for you but the hard part about making money on a blog is … writing the blog.

    There’s a few things to keep in mind when you’re writing.

    First, make sure that you’re writing about something people care about. It doesn’t have to be popular, and niche blogging is great but it has to be something that people really want to read otherwise you’re wasting your time.

    Second, try to make it original. Search engines (and readers) are not looking for copy-and-paste posts from other sites, so write something original if you’re looking to get traffic.

    Finally, write often. Try to write as often as you can but ensure it’s good, clean and useful writing. If you can do that, you’ll build a reputation as a reliable source quickly.

    10) Promotion

    The best way to get people to read your website is to post reliable comments in forums, on other blogs and sites with links back to your own online blog. Before you know it, if you’re a good net citizen other blog owners and readers will start visiting your site to see what else you have to say. Remember to always have a hyperlink to your blogs in your signatures to increase traffic to your site.

    BlueHost also gives you $75 worth of advertising on Google and Yahoo, use it to build an online marketing campaign to draw even more traffic to your website.

    I hope my suggestions helped, feel free to comment and share your own thoughts with me.