Pages in Navigation Bar - Exclude option

Requests for new features. You cannot post to this forum because new feature requests are not accepted any more.
Forum rules
New feature requests are no longer accepted, so you cannot post to this forum any more.

Pages in Navigation Bar - Exclude option

Postby dberebi » 21 Aug 2010, 19:41

In the " Suffusion => Blog Features => Main Navigation Bar Setup" admin page there is an option "Pages in Navigation Bar - All or Selected". Currently you can only select "all" (show all pages ignoring selection) or "selected" (show only selected pages in the menu).

I think we should have the option "exclude" to show all pages except for the selected pages.

Why to add this feature?
If I want to exclude a page from the menu (e.g. if I use that specific page as my homepage), this way should be the most convenient. If I'll choose the "selected" option I'll have to return to here every time I'm creating a new page to select it.
My solution also suggest a more readable and optimized code than the "selected" option.

How to add this feature? Just 2 find & replace!
in "/wp-content/themes/suffusion/functions.php"
find (line 716):
Code: Select all
   if ($page_all_sel == 'selected') {
      $pages_excluded = get_excluded_pages($page_option);
   }
   else {
      $pages_excluded = array();
   }

replace with:
Code: Select all
   if ($page_all_sel == 'selected') {
      $pages_excluded = get_excluded_pages($page_option);
   }
   elseif ($page_all_sel == 'exclude') {
      global $$page_option;
      $pages_excluded = $$page_option;
   }
   else {
      $pages_excluded = array();
   }


in "/wp-content/themes/suffusion/admin/theme-options-blog-features.php"
find:
Code: Select all
      "options" => array("all" => "All, ignoring next option", "selected" => "Selections from the next option"),

replace with:
Code: Select all
      "options" => array("all" => "All, ignoring next option", "exclude" => "Exclude the pages selected in the next option", "selected" => "Selections from the next option"),


Of course while implementing this feature you would like to make some changes like to move the "global $$page_option;" upward and maybe change the language...
dberebi
 
Posts: 2
Joined: 21 Aug 2010, 19:22

Re: Pages in Navigation Bar - Exclude option

Postby Colin » 22 Aug 2010, 08:35

This would be useful to me too should it be implemented.
Colin
 
Posts: 3889
Joined: 27 Oct 2009, 10:46


Return to Feature Requests

Who is online

Users browsing this forum: No registered users and 2 guests