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 » Header configuration & styling »

HOW TO: Add 'Include Pages' option on Page Menu Bar


  #1  
Old Jul 2, 2010, 09:19 PM
Jaf
 
1 posts · Jun 2010
I found the need for an 'include pages' option on the Page Menu Bar. This option allows you to set the pages which will display.

**Please Note: You may only set the Include OR Exclude page option. If Include is not blank it will over-ride exclude settings.

If you would like to add this option to your Atahualpa 3.5.1 theme follow the directions below.

File: atahualpa351/functions/bfa_header_config.php
Line 45:
PHP Code:
$bfa_ata['titles_page_menu_bar'], $bfa_ata['exclude_page_menu_bar']); 
Change to:
PHP Code:
$bfa_ata['titles_page_menu_bar'], $bfa_ata['exclude_page_menu_bar'], $bfa_ata['include_page_menu_bar']); 

File: atahualpa351/functions/bfa_hor_pages.php

Line 2:
PHP Code:
function bfa_hor_pages($sort_order "menu_order"$levels ""$titles "No"$exclude "") { 
Change to:
PHP Code:
function bfa_hor_pages($sort_order "menu_order"$levels ""$titles "No"$exclude ""$include "") { 
After Line 4:
PHP Code:
global $bfa_ata
Add:
PHP Code:
$clude '&exclude=' trim(str_replace(" """$exclude));
 if (
trim($include)) {
     
$clude '&include=' trim(str_replace(" """$include));
 } 

Line 6:
PHP Code:
$list_pages_string wp_list_pages('sort_column=' $sort_order '&title_li=&depth=' $levels '&exclude=' trim(str_replace(" """$exclude)) . '&echo=0'); 
Change to:
PHP Code:
$list_pages_string wp_list_pages('sort_column=' $sort_order '&title_li=&depth=' $levels $clude '&echo=0'); 

PHP Code:
Fileatahualpa351/functions/bfa_theme_options.php 
After Line 1002:
PHP Code:
<strong>XX</strongis the ID of the page."), 
Add:
PHP Code:
array(    "name" => "Include only these pages in Page Menu Bar?",
            
"category" => "page-menu-bar",
            
"id" => "include_page_menu_bar",
            
"std" => "",
            
"type" => "text",
            
"size" => "30",
            
"info" => "<ul><li>Leave blank to include all pages in the page menu bar</li><li>To include certain only certain pages to the
            page menu bar, put their ID's into this field, separated by comma</li><li>Only set the Include or Exclude page option. If Include is not blank it will over-ride exclude settings.</li></ul><strong>Example:</strong> <code>13,29,102,117</code>
            <br /><br />To get the ID of a page, go to WP Admin -> Pages -> <a href=\"edit-pages.php\">Edit</a>, point your mouse at the title of the page
            in question, and watch your browser's status bar (it's at the bottom) for an URL ending on \"...action=edit&post=<strong>XX</strong>\".
            <strong>XX</strong> is the ID of the page."
), 
After Line 77:
PHP Code:
"exclude_page_menu_bar"
Add:
PHP Code:
"include_page_menu_bar"
If you have any problems, please let me know.

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Feature Request:Page bar include instead of exclude Kadin Page & Category Menu Bars 2 May 11, 2010 02:01 PM
Tabbed page menu-option for plain bar? paulae New Versions, & Updating 0 May 10, 2010 06:43 AM
RFE: add Only Include Pages option for Page Menu Bar Henry64 Page & Category Menu Bars 4 Jan 1, 2010 09:38 AM
[SOLVED] Option not to add new page to page menu bar joaodagraca Page & Category Menu Bars 2 Jul 27, 2009 10:01 AM
[SOLVED] Very minor : page menu bar home option dcousquer Page & Category Menu Bars 1 Dec 13, 2008 03:52 AM


All times are GMT -6. The time now is 06:26 AM.


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