Header and Footer
Header and Footer lets to insert whatever you need in to the head and the footer parts of each blog page. Its main purpose is to add various scripts to track the access to the blog (such as Google Analytics or MyBlogLog) and to add metatags to the header section (like the ones required by Google Webmasters Tools).
To insert something you have only to copy and paste the code, no need to install 5 different plugins for MyBlogLog, Analytics, Google WebMaster, AdSense-Analytics integration. Clearly, if you aren’t able to copy and paste, keep on using the specific plugin for each service…
From version 1.1 you can use PHP code too. It’s useful to add some logic (see below).
Download
Header and Footer is available on WordPress Plugin Directory at this URL
and if you find it useful, don’t forget to give it a vote…
Usage
All posts about Header and Footer can be found under the tag “header footer“.
It’s so simple that this paragraph is not really useful, but… here a screen shot of the configuration panel with values I’m using in a my blog.
There are themes which fo not have the “wp_footer” call, or have the footer crypted: check the source of generated pages to see if the code you configured is injected or not. Other plugins that add such kind of codes in the footer may have the same problem!
The image below is the source of an internal page of a my blog: the Analytics code is there.
Using PHP code
PHP code can be used on footer and header configuration to add specific logic and control what will be inserted. The classical example is to avoid Google Analytics code while the admin is logged in.
Here an example directly from my blog:
<? if (!is_user_logged_in()) { ?>
<script type="text/javascript">
...GOOGLE ANALYTICS CODE...
</script>
<? } ?>
The surrounding
<? if (!is_user_logged_in()) { ?>
and
<? } ?>
let the code to be added only when a user is not logged in. Clearly this logic is good only for blog which have only an administrator, not the ones having lot of registered people that has to be tracked.
Versions and more
Everithing I wrote about Header and Footer plugin can be found under the tag “header footer“.



I'm Stefano Lissa. Ten years ago I was building web sites for pleasure. Blogs didn't exist, web content systems were ugly, hosting was really expensive... and my student pocket was empty.
No comments yet... Be the first to leave a reply!