New Landing How can we help? Themeforest Theme Support Flexform Exclude "news" in the sitemap

Viewing 8 posts - 1 through 8 (of 8 total)
  • Posted in: Flexform
  • #81984
    blaouchez
    Member
    Post count: 448

    Hello,
    If I create a sitemap (SPB> sitemap) how to exclude “news”?
    Regards

    #82027
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please provide specific page url with sitemap. So i can check that where to remove news?
    Thanks

    #82034
    blaouchez
    Member
    Post count: 448
    #82038
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please put this code at functions.php of child theme:

    remove_shortcode('sf_sitemap');
    function sf_sitemap_new($params = array()) {  
    	    // default parameters  
    	    extract(shortcode_atts(array(  
    	        'title' => 'Site map',  
    	        'id' => 'sitemap',  
    	        'depth' => 2  
    	    ), $params));  
    	    // create sitemap
    	    
    	    $sitemap = '<div class="sitemap-wrap clearfix">';
    	    
    	        $sitemap .= '<div class="sitemap-col">';
    	            
    	            $sitemap .= '<h3>'.__("Pages", "swiftframework").'</h3>';
    	              
    	            $page_list = wp_list_pages("title_li=&depth=$depth&sort_column=menu_order&echo=0");  
    	            if ($page_list != '') {  
    	                $sitemap .= '<ul>'.$page_list.'</ul>';  
    	            }
    	        
    	        $sitemap .= '</div>';
    	        
    	       /* $sitemap .= '<div class="sitemap-col">';
    	        	
    	        	$sitemap .= '<h3>'.__("Posts", "swiftframework").'</h3>';
    	        	  
    	        	$post_list = wp_get_archives('type=postbypost&limit=20&echo=0');
    	        	if ($post_list != '') {  
    	        	    $sitemap .= '<ul>'.$post_list.'</ul>';  
    	        	}	  	
    	        	
    	        $sitemap .= '</div>';*/
    	        	
    	    	$sitemap .= '<div class="sitemap-col">';
    	        	
    	        	$sitemap .= '<h3>'.__("Categories", "swiftframework").'</h3>';
    	        	  
    	        	$category_list = wp_list_categories('sort_column=name&title_li=&depth=1&number=10&echo=0');
    	        	if ($category_list != '') {  
    	        	    $sitemap .= '<ul>'.$category_list.'</ul>';  
    	        	}		
    	        	
    	        	$sitemap .= '<h3>'.__("Archives", "swiftframework").'</h3>';
    	        	  
    	        	$archive_list =  wp_get_archives('type=monthly&limit=12&echo=0');
    	        	if ($archive_list != '') {  
    	        	    $sitemap .= '<ul>'.$archive_list.'</ul>';  
    	        	}
    	        	
    	    	$sitemap .= '</div>';
    	    	
    	    $sitemap .= '</div>';
    	    
    	    return $sitemap;  
    	    
    	}  
    	add_shortcode('sf_sitemap', 'sf_sitemap_new');  
    	

    Hope that should fix your issue and let me know your feedback.
    Thanks

    #82049
    blaouchez
    Member
    Post count: 448

    Thanks Mohammad but it is too complicated to set, I installed a plugin

    #82050
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Its not complicated so you can do it easily. Just try it out.
    Thanks ๐Ÿ™‚
    With Best Regards
    Swift Ideas

    #82056
    blaouchez
    Member
    Post count: 448

    I tried but it does not work โ€ฆ I use “Kwayy HTML Sitemap” right now

    #82060
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Its ok. I am glad that you managed to resolve the issue.
    Thanks ๐Ÿ™‚
    With Best Regards
    Swift Ideas

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register