Archive

Archive for the ‘wordpress’ Category

WordPress Baby Steps – Part 1

July 9th, 2009 No comments

WordpressI’m quite new to WordPress. So there’s a lot of hiccups and accidents that i tend to make while trying to get the install up to what i want it to be.

The WordPress Baby Steps will be my experiences of stumbling through WordPress.

Current Scenario:
Me trying to change where the Tagline for the blog points to.

The title of my blog currently points to the blog itself. Which is fine for most cases, but in my case i wanted it to point back to http://bhowmikshah.com/ just so that the user has an easy way of going to the landing page for the website.

Now i wasn’t sure how to do this and i kept playing around with a lot of settings and stumbled across the two settings below.

wp-admin -> Settings -> General – WordPress address
wp-admin -> Settings -> General – Blog Address

Like most other guys, reading instructions is not built into my system and i proceeded to try changing it without worrying too much about what it actually does change.

I changed the WordPress address URL and saved my settings and all seemed to be fine. I could access the website, get to the blog, browse the posts but the link wouldn’t work. So i tried to go into wp-admin and realised that it was redirecting to bhowmikshah.com/wp-admin which wasn’t right since it needed to redirect to bhowmikshah.com/blog/wp-admin

And i realised what i had changed – doh!

But now more importantly i needed to be able to figure out how to reverse the change because i had lost admin access to my blog. There was no way i could see to be able to get to wp-admin because of the redirection.

I headed off to the WordPress Codex and started reading around to figure out how to reverse what i had just done. And i stumbled across Changing the Site URL.

I tried the quick fix method which involved adding the following lines at the beginning of the functions.php file for the active theme.

update_options('siteurl','http://example.com/blog');
update_options('home','http://example.com/blog');

Replace http://example.com/blog with the address for your WordPress install.

If you only have ftp access to your server then y
ou can download the functions.php file locally, make the changes and then reupload it or if you have shell access to your account you can make the changes on the server itself.

Just remember to remove the lines after you've fixed the problem.

Eventually i still haven’t changed the link for the Tagline 🙁 . Soon. Soon.

Update: For my theme (iNove) I needed to modify the header.php file. In header.php look for the line that starts the top bar navigation,

<!-- navigation START -->
<div id="navigation">
	<!-- menus START -->
	<ul id="menus">

This is the beginning of the list that displays the navigation menu at the top. You need to add a list element to this list to display your link.

for e.g. To add a link to the top navigation bar which points to Google you need to add the following line

 <li><a href="http://www.google.com">Google</a></li>


Turns out it was quite easy and painless in the end.

Tags: ,