Digital experiences for all disciplines
New Landing › How can we help? › Themeforest Theme Support › Flexform › Exclude "news" in the sitemap
New Landing › How can we help? › Themeforest Theme Support › Flexform › Exclude "news" in the sitemap
- This topic has 7 replies, 2 voices, and was last updated 9 years by Mohammad – SUPPORT.
-
Posted in: Flexform
-
June 12, 2014 at 10:16 am #81984
Hello,
If I create a sitemap (SPB> sitemap) how to exclude “news”?
RegardsJune 12, 2014 at 1:36 pm #82027Hi,
Please provide specific page url with sitemap. So i can check that where to remove news?
ThanksJune 12, 2014 at 2:21 pm #82034June 12, 2014 at 2:34 pm #82038Hi,
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.
ThanksJune 12, 2014 at 3:28 pm #82049Thanks Mohammad but it is too complicated to set, I installed a plugin
June 12, 2014 at 3:29 pm #82050Hi,
Its not complicated so you can do it easily. Just try it out.
Thanks ๐
With Best Regards
Swift IdeasJune 12, 2014 at 3:53 pm #82056I tried but it does not work โฆ I use “Kwayy HTML Sitemap” right now
June 12, 2014 at 4:14 pm #82060Hi,
Its ok. I am glad that you managed to resolve the issue.
Thanks ๐
With Best Regards
Swift Ideas -
Posted in: Flexform
You must be logged in and have valid license to reply to this topic.