View Single Post
  #3  
Old 10-07-2014, 08:17 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: Wordpress in XC 5 ... remove "Blog" from Top Menu

You can just do ... instead of looping through the array and creating new one

PHP Code:
protected function defineItems()
{
    
$items parent::defineItems();
        
        foreach (
$items as $aItem) {
        if (
$aItem['label'] == static::t('Blog')) {
            unset(
$items[$aItem]);
            break;
        }
        }
    
    
// if the array is just a contiguous numeric array you
    // may want to renumber it before the return 
    // array_values($array)
    
return $items;

__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote