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

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


  #1  
Old Jul 2, 2010, 10: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 03:01 PM
Tabbed page menu-option for plain bar? paulae New Versions, & Updating 0 May 10, 2010 07:43 AM
RFE: add Only Include Pages option for Page Menu Bar Henry64 Page & Category Menu Bars 4 Jan 1, 2010 10:38 AM
[SOLVED] Option not to add new page to page menu bar joaodagraca Page & Category Menu Bars 2 Jul 27, 2009 11:01 AM
[SOLVED] Very minor : page menu bar home option dcousquer Page & Category Menu Bars 1 Dec 13, 2008 04:52 AM


All times are GMT -6. The time now is 07:44 AM.


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