I don’t have a great deal to do last night so I viewed my about and link pages. I was distressed, disappointed that my sidebar for pages (about, link, my-blog, inspirational, archives, categories) doesn’t display precisely as it should. Parts of the sidebar were below the posts (content) making the footer goes out of its position as well. At first I thought it was only because of my slow connection, but after refreshing twice, thrice, I was convinced something went wrong. I don’t know how this sidebar display problem started, but when I first uploaded this theme, months ago, it was working fine.
When I added widgets such as mybloglog and blogcatalog, I didn’t bother to check how it displays on other pages; I was more concerned on the homepage look where all the widgets are located. Since the sidebar displays appropriately in the homepage, I thought the other pages were also properly displayed. Little did I know that my sidebar in other pages were broken. It also shows some widgets meant only for the homepage.
I immediately opened my themes folder and looked for sidebar.php
. I am using this sidebar file for my homepage (index.php
) and other pages. I am just using the <?php if (is_page()) { ?>
and <?php if (is_home()) { ?>
so the look would be different in other pages. Checking on the codes, I noticed that some of the if statements
are in the wrong places. Ha!Ha! Had I viewed at least one of my other pages before, I would have known this problem earlier.
I assessed the codes and made necessary modification. I then viewed the changes through my local wordpress install. Everything went smoothly again. It’s back to its previous state, so I uploaded the files to my server. I tested my pages again online a few times to make sure everything’s in the right position. And it is! 😀
I failed to notice the erroneous sidebar display before for my other pages because when I visit my site I only check the homepage and the posts (located in single.php
). I had no problem with my single.php
file since it uses different sidebar file.
Lessons I learned from this? One, double check your codes. Second, always test all the pages that will be affected by the file you modified.
Ako super hilig ko rin magkutingting sa codes ng theme ko kaya minsan biglang nagkaka-error hehe
Happy weekend!
Sasha
She {– pwede makipag-exchange links dito sa new blog ko? 🙂
sasha’s last blog post…
Are you an A-List Blogger?
fren,
i also noticed that your shout box is missing. i miss “shouting” at you. hehehe!
jessie’s last blog post…
Confused
Sasha, linked u up already.
Jessie, nawala ba yung shoutbox kanina? Kasi di ko nmn sya tinatanggal.
Amor’s last blog post…
Sidebar Display Problem
SHOCKS! na nosebleed ako. HAhahaha. Ako, I’m afraid to make butingting na may blog kase lagi ko syang nasisra…hahahha
just recently lang yung wp threaded comments di ko mapagana and it took me 1 month to fix it…nahilo ako…ayoko ng ganun hehehhe
chuvaness’s last blog post…
Vogue Magazine’s New Cover Girl
Kaya nga advantage pa rin sa akin ang pagkakaroon ng local wordpress, in that way, mate-test mo muna ang outcome ng pagkutingting sa mga codes, without sacrificing the live/online blog. Yun nga lang, ang pagkakamali ko, di ko natest sa ibang page na gumagamit din ng file na ‘pinaki-alaman’ ko. Shonga-ers no, hehe.
Amor’s last blog post…
39 Questions About Me