Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Header configuration & styling (http://forum.bytesforall.com/forumdisplay.php?f=15)
-   -   HOW TO: Add 'Include Pages' option on Page Menu Bar (http://forum.bytesforall.com/showthread.php?t=7912)

Jaf Jul 2, 2010 09:19 PM

HOW TO: Add 'Include Pages' option on Page Menu Bar
 
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.


All times are GMT -6. The time now is 11:33 AM.

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