how-to

View Comments
Say no to sidebars! (customize your Wordpress pages)

custom drinkTypically, I blog about educational technology that the average teacher can understand. This, however, is some heavy lifting.

Here is an advanced trick for Wordpress users. This is how I removed the sidebar from one specific page (titled forum) on my wordpress site. After much searching, I found that I needed to implement conditional formatting using php.

Here’s my problem:
I wanted one single wordpress page to not have a sidebar. I wanted it to take up the entire width of the page. Makes sense for a forum, right? Not so easy…

Solution:
In the wordpress dashboard, navigate to Appearance > Editor > page.php.
On page.php, I changed:

<?php get_sidebar();; ?>

to:

<?php if(!is_page('Forum')) get_sidebar();; ?>

Here’s what that means:
Typically, wp displays the sidebar. That’s what we usually want. In this case, the exclamation point means “if it is not”. So, the php translation is, “If it’s not the Forum page, then show the sidebar.”

Perfect, so far. However, there was a blank space where the sidebar used to be. Another problem. The forum should be wider. This won’t happen, though, because my stylesheet says the page can only be 510 pixels wide.

So, I went to my stylesheet and created a div titled #widecolumn with a width of 100%.

Back on page.php, I changed the original div titled #contentleft to:

<?php if(!is_page('Forum')) { ?>
<div id="contentleft">
<?php } else { ?>
<div id="widecolumn">
<?php } ?>

Again, with the php translation: “If it’s not the Forum page, use the div #contentleft (with a width of 510 px). If it is the Forum page, use the #widecolumn div that you just made (with a width of 100%).

Yay!

View Comments
The Essential Approach to Masking in Photoshop

Deke McClelland made a screencast for Scott Kelby about masking using channels. I just finished Scott Kelby’s book on Photoshop channels. Heed this warning: this 30 minute training video is not for the light-hearted. It’s not for an intro to Photoshop. If you have some decent Photoshop chops, there are a few gems that Deke covers.

btw, if you don’t know who Scott and Deke are, go spend a day on their web pages.

About

Subscribe to learn about ed tech awesomeness, and join the discussion of how technology is transforming the face of education. Email me if you'd like.

Archives

Contact