Web news

How Negative Keywords Can Help Your SEO Strategy
The first thing any Pay-Per-Click (PPC) campaign should include is a good list of keywords. The second thing it should have is a list of negative keywords. This is because there is a lot of search traffic on...

SEO Must Be Maintained On A Daily Basis
Many people think that SEO is a set-it and forget it endeavor. The theory is that once you optimize the site then there really isn't much more to do after that. This is something that many penny pinchers like...

What Do Low Quality Links Mean For You
A latest Webmaster Blog is providing solutions to the webmasters who want to get rid of the low-quality links on the Webmaster Tools. There is no doubt that every site owner wants to build a good reputation...


12.14.09

Adding Submenus To Your Wordpress Blog

By Alister Cameron

If you're using WordPress as a CMS, you may have set up static pages for both a front page (e.g. "Home") and a page to list your latest blog posts (e.g. "Blog"). I did that today for a client site and immediately realized that in the site's main menu the Blog link would look a lot better if it had a submenu containing all the blog categories.

(I didn't want nor did I need a completely separate category menu.) So I threw together this little bit of code that takes care of just that: (click to enlarge)




For you programmers out there, this is just a slightly intelligent way to inject the output of wp_list_categories() into the output of wp_list_pages(), at the right place.

If looking at code scares you I've turned it into a plugin. Go to the Admin > Plugins > Add New page in your WordPress installation and search for "add categories to menu", or download it here (give that file a .php extension instead of .txt and upload it).

As soon as I have a live site sporting this plugin, I'll update this post with a link, so you can see a live demo.

I'm likely to update this shortly with a configuration page so you can specify categories to exclude, and so forth. Comment below if you urgently need that.

Comments


About the Author:
Alister Cameron is an accomplished web designer and internet marketing consultant who turns established subject-matter experts into expert bloggers. Alister's clients are using blogging and social media to leverage their offline expertise in the online world, and engage Alister to build their blogging platform or social network; to train them in writing and online marketing strategy; and to help them stay up with the latest developments in blogging and online marketing. Alister's blog is a rich tapestry of advice, anecdotes and reflections from the frontline of professional blogging, social media and search engine marketing, and never without generous dollops of humor and wit.
About DevWebProBR
DevWebProBR is for professional developers ... those who build and manage applications and sophisticated websites. DevWebProUK delivers via news and expert advice New Strategies In Development.
iEntry





DevWebProBR is brought to you by:

SecurityConfig.com NetworkingFiles.com
NetworkNewz.com WebProASP.com
DatabaseProNews.com SQLProNews.com
ITcertificationNews.com SysAdminNews.com
LinuxProNews.com WirelessProNews.com
CProgrammingTrends.com ITmanagementnews.com






-- DevWebProBR is an iEntry, Inc. publication --
iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509
 © 2009 iEntry Inc.  All Rights Reserved  Privacy Policy  Legal 

advertising info | news headlines | free newsletters | comments/feedback | submit article