Web produceR & SEO Analyst by profession! Traveler in Life!! Biker at Heart!!! Photographer by Passion!!!! Rider for Eternity!!!

Posts tagged “WordPress

How to add Widgets to WordPress Footer

Lately, i came across scores of Blogs with help me (tag) to WordPress Widget-footer when i was browsing other posts on the blogs

No Widgets in the footer simply means you are in nowhere when you want to read further, You reach the bottom of the post just to find that you have no place to go further.

BUT, if the page has a footer widgets, you are previlaged to access the site more, see other posts you may enjoy or simply the alluring comments placed. So having worked it out, I think I should share my “How to add Widgets to WordPress Footer.”

Here it goes…

There are really three main parts to introducing a footer-sidebar
1. Registering the Sidebars in the WordPress Theme
2. Inserting the Sidebars In the WordPress Theme
3. Putting some style into the sidebars

STEP 1:
Let WordPress acknowledge that you want to use three more widget positions, and they should be called “footer 1″, “footer 2″ and “footer 3″)

Go to the WordPress theme editor and open the Theme Functions (functions.php) file. Now Search for the following line in your Theme Functions (functions.php)

if ( function_exists(‘register_sidebar’) )

Use the theme editor for your current theme, to add an extra line of code to the functions.php file (it’s the 3rd line below, beginning register_sidebars(3,array…

if ( function_exists(‘register_sidebar’) )
register_sidebar();
register_sidebars(3, array(‘name’=>’Footer %d’));

The above will register 3 sidebars (one that you already have and three more that you are about to introduce in the footer area of your wordpress theme).
STEP 2:
Insert the Sidebars In the WordPress Theme

Lets tuck in the sidebars to the exact loaction in the WordPress theme.Here, we will put the sidebars in the footer area of the theme. Dual Click the footer.php (Theme Functions) file and insert the accompanying code right on top of the ‘footer’ class

<div id=”footer-sidebar”>
<div id=”footer-sidebar1″>
<?php if ( !function_exists(‘dynamic_sidebar’) || !dynamic_sidebar(2) ) : ?>
<?php endif; ?>
</div>

<div id=”footer-sidebar2″>
<?php if ( !function_exists(‘dynamic_sidebar’) || !dynamic_sidebar(3) ) : ?>
<?php endif; ?>
</div>

<div id=”footer-sidebar3″>
<?php if ( !function_exists(‘dynamic_sidebar’) || !dynamic_sidebar(4) ) : ?>
<?php endif; ?>
</div>

</div>
<div style=”clear-both”></div>

STEP 3:
Trend the new footer divs, by adding div styles to your style.css file (note: I believe, you need to align the width parameters and other style elements, to suit your particular theme)

/* Footer Widgets */

#footerwidgets {
display: block;
}
#footer-left {
width: 210px;
float: left;
margin: 15px 10px 10px 30px;
padding: 10px;
background-color: #f3f3e7;
}
#footer-middle {
width: 210px;
float: left;
margin: 15px 10px 10px 15px;
padding: 10px;
background-color: #f3f3e7;
}
#footer-right {
width: 210px;
float: left;
margin: 15px 10px 10px 15px;
padding: 10px;
background-color: #f3f3e7;
}

Advertisements

How to Install WordPress Using Xampp

I work with WordPress offline for a quite a long time and its basically for practical purposes. I try new themes available and my bandwidth is less consumed at my web host. I do it with my stingy skills on PhP, MySql and WordPress.

Why?
The basic cause is that you can develop your project more quick and in ease of time and as mention less bandwidth consumed and guess what you don’t need to use your FTP. With the advantage of your project, you can detect major problems without others constant attendance. That’s the catch. You can install the plugins, upgrade it to the most latest and virtually make anything else with confidence with the knowledge that if there are any errors, there is no impact on your orginal site

It is also very easy.
This is written for Windows XP Home. It works for XP Pro, but only if you stop IIS.

First go and download XAMPP Lite from. You can choose a larger package if you need, but for WordPress, the Lite package is fine.
You can choose one of two download packages – the ZIP or the EXE.
If you are unsure, choose the EXE as this will install itself. (The EXE is also smaller).  Move the downloaded EXE file to the root of the drive. In my case, this is C:\Swapan Pradhan On Xampp & Word PressDouble-click the file and the extract dialog will appear:

Swapan Pradhan On Xampp & Word PressClick extract – and wait a few moments while it does its job.
You will then have the xampplite directory at root:Swapan Pradhan On Xampp & Word PressNow you need to start Xampp.
Open the xampplite folder.
You should be seeing a screen with these files (among others) on:

Swapan Pradhan On Xampp & Word PressClick “setup_xampp.bat”

Swapan Pradhan On Xampp & Word Press

Once you have the success message, you can click “xampp-control.exe”

Swapan Pradhan On Xampp & Word Press

Now click both indicated buttons to get xampp working in the way we need

Swapan Pradhan On Xampp & Word Press

You’ll know it’s working when you see this

Swapan Pradhan On Xampp & Word Press

Now you need to see it all properly.
In your browser, enter the address http://localhost/xampp/splash.php

Swapan Pradhan On Xampp & Word Press

After you have clicked your language and entered the program, click phpMyAdmin.

Swapan Pradhan On Xampp & Word Press

Copy exactly what is in this image and press Create.

Swapan Pradhan On Xampp & Word Press

That is xampp completely sorted out for now.

Download and unzip WordPress.
Open the file wp-config-sample.php
These are the exact details you need for Xampp to work because the default user in phpmyadmin is called ‘root’ and there is no password.

define(‘DB_NAME’, ‘wordpress’); // The name of the database
define(‘DB_USER’, ‘root’); // Your MySQL username
define(‘DB_PASSWORD’, ”); // …and password
define(‘DB_HOST’, ‘localhost’); // 99% chance you won’t need to change this value

Copy those details into your wp-config file, and save it as wp-config.php

Now you need to copy the files to the right place.
Click the Start button, followed by My Computer > Main drive > Xampplite > htdocs
Copy the whole WordPress folder into this directory.

In your browser, go to http://localhost/wordpress/wp-admin/install.php and everything from there should run smoothly!

NOTES:

  • You do not need to use the inbuilt editor to change any WP files. Just open them directly in your text editor, make your changes and then save. As there is no uploading to do, it makes things much much faster – and you can do this without an internet connection too.
  • If you want to use permalinks, you will need to make a change inside another file:
    Click the Start button, followed by My Computer > Main drive > Xampplite > apache > Conf and find the file httpd.conf. Open that in a text editor. Use the search facility in the editor to find “rewrite”. The line you need looks like this:

#LoadModule rewrite_module modules/mod_rewrite.so

You need to take away the hash sign so it looks like this

LoadModule rewrite_module modules/mod_rewrite.so

Now just save the file.