|
||
making categories look like pagesPosted by admin on December 5th, 2009 · Filed under adminThe categories template in our theme does a nice job of listing posts, and it’s the preferred way to show time-based things on the CAMRA site. However, categories don’t show up in our banner menu, because (currently, at least) it only looks for PAGES. There are two ways to override this. In both cases we first make a page with the right name, e.g. “news”. Then… either edit the .htaccess file to do a redirect, like this: RedirectMatch "^/news/$" http://wp.camravancouver.ca/category/news/ Redirect /news/index.php http://wp.camravancouver.ca/category/news/ (You don’t REALLY need the second one, but it doesn’t hurt to be anal…) Or make an adjustment to the JQuery code that massages the page list into our menus, in the Header template:
All the latter does is add the category to the menu. This can be useful in certain situations, but the former solution is actually better, because it takes the original page out of circulation. In the latter case, you can still go to “/news/” and NOT see the category listing. In either case, best to put text like this into the page itself, as a backup:
Could probably put a trigger in there somehow to alert someone if such a page IS ever seen.
Campaign for Real Ale Vancouver © 2007-2010 all rights reserved
|
||
|
|
||