Diễn Đàn SEO Panda - SEO Panda Forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Diễn Đàn SEO Panda - SEO Panda Forum

Diễn Đàn SEO Panda Dành Cho Các SEOers Tự Do Thảo Luận SEO - SEO Panda Forum - Free SEO Forum to share your knowledge to the world
 
HomeLatest imagesSearchRegisterLog in
Search
 
 

Display results as :
 
Rechercher Advanced Search
Latest topics
» Top 10 SEO Tools ( fresh links )
Rethink that sidebar, Again! Advanced WordPress SEO EmptyWed Feb 04, 2015 10:56 pm by tranvanchienhn

» Bán Textlink Pr4-Pr6 (1PR9)
Rethink that sidebar, Again! Advanced WordPress SEO EmptyWed Feb 04, 2015 10:54 pm by tranvanchienhn

» Google’s Penguin Update: What it is, What it isn’t, and What to Do
Rethink that sidebar, Again! Advanced WordPress SEO EmptyTue Apr 22, 2014 3:23 pm by johnaclayton

» Free Click Bank Affiliate Tool
Rethink that sidebar, Again! Advanced WordPress SEO EmptyTue Apr 22, 2014 3:21 pm by johnaclayton

» SEO is Dead – Long Live SEO
Rethink that sidebar, Again! Advanced WordPress SEO EmptyTue Apr 22, 2014 3:17 pm by johnaclayton

» Local SEO là gì - 10 Thủ thuật Local SEO
Rethink that sidebar, Again! Advanced WordPress SEO EmptyWed Apr 02, 2014 3:31 pm by bao.seoinet

» Get High Rankings by Building Authoritative, Irrelevant links?
Rethink that sidebar, Again! Advanced WordPress SEO EmptySat Sep 21, 2013 9:32 pm by kyostyle1

» The best Engineering software
Rethink that sidebar, Again! Advanced WordPress SEO EmptySat Sep 14, 2013 2:12 pm by read2

» Tuxedos- Traditional Interest Trend
Rethink that sidebar, Again! Advanced WordPress SEO EmptyWed Sep 11, 2013 2:16 pm by taiiwin


 

 Rethink that sidebar, Again! Advanced WordPress SEO

Go down 
AuthorMessage
khiemsound




Posts : 1016
Points : 24970
Join date : 2012-03-27

Rethink that sidebar, Again! Advanced WordPress SEO Empty
PostSubject: Rethink that sidebar, Again! Advanced WordPress SEO   Rethink that sidebar, Again! Advanced WordPress SEO EmptySat Apr 21, 2012 8:47 pm

The WordPress sidebar is such an important piece of real estate on your blog, a lot of internal navigation clicks happen there and lots of people can exit through the links you display there too.

So why does such an important part of your blog get ignored, or at least treated in exactly the same way on every single page, be it the homepage or a single post? Developing an idea from Joost’s WordPress SEO guide, I’m going to look at how you can customise the links or features you display relative to the page your visitor happens to be, er, visiting.

I’ve spent a few hours setting up the basics on my blog and I’m pretty sure I’m going to be thinking about and refining my sidebar strategy on an ongoing basis until it’s right. Here’s the screenshot of my homepage, with each important section highlighted:



Compare that to the sidebar you see to your right. I’ve taken Joost’s advice and rethought my sidebar. How do you set up your sidebar so it conditionally displays features relevant to content type? The WordPress conditional tag will be the lesson for the day.

Using the conditional tag to display features when a visitor hits your homepage (but not the rest of the site) is reasonaly simple. A conditional tag checks to see if something is true or false, so if you ask “is this the homepage?” you’ll either recieve a true or false response. The conditional tag we’re going to use looks like this:



and finish with:



You’re going to need to be comfortable making a small edit to your sidebar.php file by clicking to Design>Theme editor>Sidebar (sidebar.php). I’m going to use my “Find me on” section as the example.

Here’s the code for the “find me on” section. I’ve stripped out all but the first row of images, so you can see what’s happening more clearly without being too distracted by the javascript click tracking.



By carefully surrounding the code with our conditional tags you can easily “hide” sections of irrelevant content. Joost’s post covered removing your blogroll links in the same way. This was a little harder and in the end, I used a
tag to encapsulate the php which looks at the WordPress database for your links. Here’s how it looks:



There’s more to conditional tagging than the is_home argument – there’s some really interesting ones in the WordPress codex such as:

is_single() – When any single Post page is being displayed.
is_single('17') – When Post 17 is being displayed as a single Post

is_page() – When any Page is being displayed
is_page('about-me') – When the Page with a post_name (slug) of “about-me” is being displayed

There are heaps more so I strongly recommend you take a look on the WordPress codex site. I also strongly recommend that you back up the contents of your sidebar.php file!

Want to see the results? Two weeks later I wrote up the results in a post titled: reduce the bounce rate on your blog
Back to top Go down
 
Rethink that sidebar, Again! Advanced WordPress SEO
Back to top 
Page 1 of 1
 Similar topics
-
» 10 thủ thuật SEO cơ bản tối ưu hóa WordPress
» Bảo mật cho Blog WordPress cá nhân
» WordPress SEO plugins – Optimise your blog
» How to Create Page Templates in WordPress
» Bloggerhigh SEO Plugin for wordpress

Permissions in this forum:You cannot reply to topics in this forum
Diễn Đàn SEO Panda - SEO Panda Forum :: Search Engine Optimization :: Black Hat SEO-
Jump to: