{"id":30982,"date":"2014-08-13T04:40:37","date_gmt":"2014-08-13T04:40:37","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/sewn-in-xml-sitemap\/"},"modified":"2017-09-02T18:43:52","modified_gmt":"2017-09-02T18:43:52","slug":"sewn-in-xml-sitemap","status":"publish","type":"plugin","link":"https:\/\/cs.wordpress.org\/plugins\/sewn-in-xml-sitemap\/","author":70828,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"2.0.6","stable_tag":"2.0.6","tested":"4.8.28","requires":"3.6.1","requires_php":"","requires_plugins":"","header_name":"Sewn In XML Sitemap","header_author":"Jupitercow","header_description":"","assets_banners_color":"d3d9d6","last_updated":"2017-09-02 18:43:52","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/www.paypal.com\/cgi-bin\/webscr?cmd=_donations&business=jacobsnyder%40gmail%2ecom&lc=US&item_name=Jacob%20Snyder&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted","header_plugin_uri":"https:\/\/wordpress.org\/plugins\/sewn-in-xml-sitemap\/","header_author_uri":"http:\/\/Jupitercow.com\/","rating":5,"author_block_rating":0,"active_installs":30,"downloads":4078,"num_ratings":4,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":{"2.0.6":"<p>Removed array short syntax, so that we can now support WordPress PHP requirements (5.2.4).<\/p>","2.0.0":"<p>There are some basic compatibility issues with some of the filters and actions from 1.0.x.<\/p>","1.0.3":"<p>This is the first version in the Wordpress repository.<\/p>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":"5"},"assets_icons":{"icon-128x128.jpg":{"filename":"icon-128x128.jpg","revision":"1088698","resolution":"128x128","location":"assets"},"icon-256x256.jpg":{"filename":"icon-256x256.jpg","revision":"1088698","resolution":"256x256","location":"assets"}},"assets_banners":{"banner-1544x500.jpg":{"filename":"banner-1544x500.jpg","revision":"1722259","resolution":"1544x500","location":"assets"},"banner-772x250.jpg":{"filename":"banner-772x250.jpg","revision":"1722259","resolution":"772x250","location":"assets"}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.4","2.0.0","2.0.1","2.0.2","2.0.3","2.0.4","2.0.5","2.0.6"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":"1722259","resolution":"1","location":"assets"},"screenshot-2.png":{"filename":"screenshot-2.png","revision":"1722259","resolution":"2","location":"assets"}},"screenshots":{"1":"The XML Sitemap panel with checkbox to remove posts in the backend.","2":"The <a href=\"https:\/\/wordpress.org\/plugins\/sewn-in-simple-seo\/\">Sewn In Simple SEO<\/a> panel with XML Sitemap &amp; <a href=\"https:\/\/wordpress.org\/plugins\/sewn-in-simple-social\/\">Sewn In Simple Social Optimization<\/a> installed."},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[186,1557,6358],"plugin_category":[55],"plugin_contributors":[82642,82641],"plugin_business_model":[],"class_list":["post-30982","plugin","type-plugin","status-publish","hentry","plugin_tags-seo","plugin_tags-sitemap","plugin_tags-xml-sitemap","plugin_category-seo-and-marketing","plugin_contributors-ekaj","plugin_contributors-jcow","plugin_committers-jcow"],"banners":{"banner":"https:\/\/ps.w.org\/sewn-in-xml-sitemap\/assets\/banner-772x250.jpg?rev=1722259","banner_2x":"https:\/\/ps.w.org\/sewn-in-xml-sitemap\/assets\/banner-1544x500.jpg?rev=1722259","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/sewn-in-xml-sitemap\/assets\/icon-128x128.jpg?rev=1088698","icon_2x":"https:\/\/ps.w.org\/sewn-in-xml-sitemap\/assets\/icon-256x256.jpg?rev=1088698","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/sewn-in-xml-sitemap\/assets\/screenshot-1.png?rev=1722259","caption":"The XML Sitemap panel with checkbox to remove posts in the backend."},{"src":"https:\/\/ps.w.org\/sewn-in-xml-sitemap\/assets\/screenshot-2.png?rev=1722259","caption":"The <a href=\"https:\/\/wordpress.org\/plugins\/sewn-in-simple-seo\/\">Sewn In Simple SEO<\/a> panel with XML Sitemap &amp; <a href=\"https:\/\/wordpress.org\/plugins\/sewn-in-simple-social\/\">Sewn In Simple Social Optimization<\/a> installed."}],"raw_content":"<!--section=description-->\n<h4>2.0.3 changed default post types used from only 'post' and 'page' to ALL public post types except \"attachment\". This is a cleaner approach, but may require customization. There is more info on customization below.<\/h4>\n\n<p>This site doesn't notify of new support threads, so send a <a href=\"http:\/\/jcow.com\/\">contact<\/a> through our form to notify of a new thread for a quicker response.<\/p>\n\n<p>Simple way to automatically generate XML Sitemaps when a page or post is saved. Very simple, no cruft or extra features you won't use. There are two main customizations available.<\/p>\n\n<ul>\n<li>Choose which post types are added (posts and pages by default)<\/li>\n<li>Adds a meta box to all included post types to remove single posts from being added to the sitemap<\/li>\n<\/ul>\n\n<p>It also works well with our <a href=\"https:\/\/wordpress.org\/plugins\/sewn-in-simple-seo\/\">Sewn In Simple SEO<\/a> plugin. When both are installed, they integrate together.<\/p>\n\n<h4>Control what post types are added<\/h4>\n\n<pre><code>\/**\n * Completely replace the post types in the XML sitemap\n *\n * This will replace the default completely. Returns: array('news','event')\n *\n * The result is to remove 'post' and 'page' post types and to add 'news' and \n * 'event' post types\n *\n * @param   array   $post_types List of post types to be added to the XML Sitemap\n * @return  array   $post_types Modified list of post types\n *\/\nadd_filter( 'sewn\/seo\/post_types', 'custom_seo_post_types' );\nfunction custom_seo_post_types( $post_types )\n{\n    $post_types = array('news','event');\n    return $post_types;\n}\n<\/code><\/pre>\n\n<h4>Remove a specific post from the sitemap<\/h4>\n\n<p>A checkbox is added to each post type that is included in the sitemap. Checking it will remove that specific item from the sitemap.<\/p>\n\n<p>This checkbox also removes posts from wp_list_pages, you can turn that off using this filter:<\/p>\n\n<pre><code>add_filter( 'sewn\/sitemap\/wp_list_pages', '__return_false' );\n\n\n\n\/**\n * This filter arrived in 2.0.3\n *\n * Remove specific posts programatically. This could go into functions.php or a plugin.\n *\n * This example removes all posts that have post meta field of \"test\" set.\n *\/\nadd_filter( 'sewn\/sitemap\/post', 'custom_remove_test_posts', 10, 2 );\nfunction custom_remove_test_posts( $value, $post )\n{\n    $status = get_metadata( 'post', $post-&gt;ID, 'test', true );\n    if ( $status ) {\n        $value = false;\n    }\n    return $value;\n}\n<\/code><\/pre>\n\n<h4>Change frequency for a post type, could also be used an a single post basis by checking the the $post-ID or $post-&gt;post_name<\/h4>\n\n<pre><code>\/**\n * Change sitemap frequency in XML, default is \"monthly\"\n *\n * options: always, hourly, daily, weekly, monthly, yearly, never\n *\/\nadd_filter( 'sewn\/sitemap\/frequency', 'custom_sitemap_frequency', 10, 2 );\nfunction custom_sitemap_frequency( $frequency, $post )\n{\n    if ( 'news' == get_post_type($post) ) {\n        $frequency = 'daily';\n    }\n    return $frequency;\n}\n<\/code><\/pre>\n\n<h4>Compatibility<\/h4>\n\n<p>Works with the <a href=\"https:\/\/wordpress.org\/plugins\/sewn-in-simple-seo\/\">Sewn In Simple SEO<\/a> plugin. When installed, the XML sitemap checkbox integrates with the SEO fields and this plugin will use the SEO post types. The goal is to keep things very simple and integrated.<\/p>\n\n<!--section=installation-->\n<ul>\n<li>Copy the folder into your plugins folder, or use the \"Add New\" plugin feature.<\/li>\n<li>Activate the plugin via the Plugins admin page<\/li>\n<\/ul>\n\n<!--section=faq-->\n<dl>\n<dt>Installation Instructions<\/dt>\n<dd><ul>\n<li>Copy the folder into your plugins folder, or use the \"Add New\" plugin feature.<\/li>\n<li>Activate the plugin via the Plugins admin page<\/li>\n<\/ul><\/dd>\n<dt>No questions yet.<\/dt>\n<dd><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>2.0.6 - 2017-09-02<\/h4>\n\n<ul>\n<li>Removed array short syntax, updated meta style.<\/li>\n<\/ul>\n\n<h4>2.0.5 - 2017-08-30<\/h4>\n\n<ul>\n<li>Updated meta boxes, images.<\/li>\n<\/ul>\n\n<h4>2.0.4 - 2016-01-29<\/h4>\n\n<ul>\n<li>Fixed bug in meta boxes. Updated readme.<\/li>\n<\/ul>\n\n<h4>2.0.3 - 2015-07-27<\/h4>\n\n<ul>\n<li>Updated the default post types to ALL public post types except 'attachment'.<\/li>\n<li>Add filter for posts on sitemap creation to granularly control which posts are added when needed.<\/li>\n<li>Added filter for \"frequency\".<\/li>\n<\/ul>\n\n<h4>2.0.2 - 2015-02-13<\/h4>\n\n<ul>\n<li>Fixed problem with post_types in new system.<\/li>\n<\/ul>\n\n<h4>2.0.1 - 2015-02-13<\/h4>\n\n<ul>\n<li>Bug with the get_field method and connecting to SEO plugin.<\/li>\n<\/ul>\n\n<h4>2.0.0 - 2015-02-12<\/h4>\n\n<ul>\n<li>Updated to remove ACF dependency and cleanup functionality.<\/li>\n<\/ul>\n\n<h4>1.0.3 - 2014-08-03<\/h4>\n\n<ul>\n<li>Added to the repo.<\/li>\n<\/ul>","raw_excerpt":"Simple way to automatically generate XML Sitemaps when a page or post is saved. Very simple, no cruft or extra features you won&#039;t use.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/cs.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/30982","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cs.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/cs.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/cs.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=30982"}],"author":[{"embeddable":true,"href":"https:\/\/cs.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/jcow"}],"wp:attachment":[{"href":"https:\/\/cs.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=30982"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/cs.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=30982"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/cs.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=30982"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/cs.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=30982"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/cs.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=30982"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/cs.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=30982"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}