Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

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

Adding page and category navigation in page footer


  #1  
Old May 29, 2010, 06:58 PM
rjh4242
 
5 posts · May 2010
Adding page and category navigation in page footer

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:
Quote:
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
Quote:
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:
Quote:
<?php
wp_list_pages('title_li='); ?>
Thanks for any suggestions

Bookmarks

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 12:46 PM
[SOLVED] Slight page shift when adding inner sidebar to a single page mmqc2 Sidebars & Widgets 2 Feb 19, 2010 10:34 PM
Adding a static page / link into the Page menu nibb Page & Category Menu Bars 1 Dec 11, 2009 03:19 PM
Page Navigation Issues Zeus Forum How-To 2 Aug 8, 2009 09:07 AM
Centering Page Navigation cks Page & Category Menu Bars 1 Feb 6, 2009 03:23 PM


All times are GMT -6. The time now is 01:57 AM.


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