WordPress.org

Forums

Notice: Undefined index: (4 posts)

  1. ctcp
    Member
    Posted 10 months ago #

    Notice: Undefined index: marker in /xxxx/directory.php on line 413

    line 413 i got this code

    $marker = isset($aitCategoryMeta[$categoryID]) ? $aitCategoryMeta[$categoryID]['marker'] : '';

    Can you please help what i wrong here..

    [ Code moderated, that's way too much code to post here ]

  2. Where did you get that code? If it is from a plugin or theme in the WordPress repo then I can direct you to that dedicates sub-forum for support.

  3. ctcp
    Member
    Posted 10 months ago #

    Thank you for your time
    This message come today i just edit home page text and got this error
    this code is from theme

    switch ($what) {
    		case 'icon':
    			$anc = get_ancestors( $categoryID, 'ait-dir-item-category' );
    			$icon = isset($aitCategoryMeta[$categoryID]) ? $aitCategoryMeta[$categoryID]['icon'] : '';
    			if(empty($icon)){
    				foreach ($anc as $value) {
    					if(!empty($aitCategoryMeta[$value]['icon'])){
    						$icon = $aitCategoryMeta[$value]['icon'];
    						break;
    					}
    				}
    				if(empty($icon)){
    					$icon = $GLOBALS['aitThemeOptions']->directory->defaultCategoryIcon;
    				}
    			}
    			return $icon;
    		case 'marker':
    			$anc = get_ancestors( $categoryID, 'ait-dir-item-category' );
    
    		$marker = isset($aitCategoryMeta[$categoryID]) ? $aitCategoryMeta[$categoryID]['marker'] : '';
    			if(empty($marker)){
    				foreach ($anc as $value) {
    					if(!empty($aitCategoryMeta[$value]['marker'])){
    						$marker = $aitCategoryMeta[$value]['marker'];
    						break;
    					}
    				}
    				if(empty($marker)){
    					$marker = $GLOBALS['aitThemeOptions']->directoryMap->defaultMapMarkerImage;
    				}
    			}
    			return $marker;
  4. *Drinks more coffee*

    Where did you get that code and which theme is it?

Reply

You must log in to post.

About this Topic

Tags

No tags yet.