Wordpress Themes - WP Forum at BFA
Click here to register or to donate.
Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Page & Category Menu Bars »

Adding page and category navigation in page footer

Old May 29, 2010, 07:58 PM
5 posts · May 2010
Hi there
Sorry if this post is in the wrong place - I couldn't figure out the correct forum for questions about footer content and formatting, which is probably where this belongs.

I am really impressed with the Atahualpa theme - I've only been playing with it since yesterday and I'm finding it has almost all the customisation I need.

One thing I haven't been able to find, however, is how to sort out the text navigation links I want to put in the page footer. I'm aiming for just a simple horizontal row of links in the footer, linking to each of the top level pages and categories on the site.

I found a post on how to get one menu bar showing both pages and categories, which works well and sorts out the menu bar at the top of the page, but I haven't been able to figure out how to do the same in the footer without messing with the code, and also I'm having to specify each page and category individually rather than just asking for all top level pages and categories.

At the moment, I am specifying each page by id in the footer using %page-nn%, but I'd really like to be able to generate the list automatically, the way the menu bar does. Also, there doesn't seem to be a way to specify categories at all. As a workaround, I've added code to bfa_footer.php to allow specification of categories by id in a similar way to the way pages are specified, by adding a new function:
function footer_category_links($matches) {
$category_id = $matches[1];
$category_data = get_category($category_id, ARRAY_A);
$category_title = $category_data['cat_name'];
$category_url = get_category_link($category_id);
return '<a href="' . $category_url . '">' . $category_title . '</a>';
and inside the bfa_footer function adding the following
if ( strpos($footer_content,'%category') !== FALSE ) {
$footer_content = preg_replace_callback("|%category-(.*?)%|","footer_category_links",$footer_content);
Am I missing something - is there some simpler way to do this? I tried adding the following php code to the content of the footer but it didn't produce any output:
wp_list_pages('title_li='); ?>
Thanks for any suggestions


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
Removing page name from Body. Also, adding links into Footer OrganicAnalyticsNow Atahualpa 3 Wordpress theme 19 Feb 23, 2010 01:46 PM
[SOLVED] Slight page shift when adding inner sidebar to a single page mmqc2 Sidebars & Widgets 2 Feb 19, 2010 11:34 PM
Adding a static page / link into the Page menu nibb Page & Category Menu Bars 1 Dec 11, 2009 04:19 PM
Page Navigation Issues Zeus Forum How-To 2 Aug 8, 2009 10:07 AM
Centering Page Navigation cks Page & Category Menu Bars 1 Feb 6, 2009 04:23 PM

All times are GMT -6. The time now is 07:24 PM.

Powered by vBulletin® Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.