{"id":3767,"date":"2008-10-07T23:21:28","date_gmt":"2008-10-07T23:21:28","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/smart-404\/"},"modified":"2020-11-24T02:27:32","modified_gmt":"2020-11-24T02:27:32","slug":"smart-404","status":"closed","type":"plugin","link":"https:\/\/ko.wordpress.org\/plugins\/smart-404\/","author":1144815,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"0.6","stable_tag":"0.6","tested":"5.6.17","requires":"2.6","requires_php":"5.3","requires_plugins":"","header_name":"Smart 404","header_author":"Michael Tyson","header_description":"","assets_banners_color":"","last_updated":"2020-11-24 02:27:32","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/github.com\/leonstafford\/smart-404","header_author_uri":"http:\/\/atastypixel.com\/blog\/","rating":4,"author_block_rating":0,"active_installs":900,"downloads":115055,"num_ratings":0,"support_threads":1,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","changelog"],"tags":{"0.2":{"tag":"0.2","author":"michaeltyson","date":"2008-10-07 23:21:58"},"0.3":{"tag":"0.3","author":"michaeltyson","date":"2008-10-15 22:47:16"},"0.3.1":{"tag":"0.3.1","author":"michaeltyson","date":"2009-03-30 23:28:35"},"0.3.2":{"tag":"0.3.2","author":"michaeltyson","date":"2009-05-14 00:27:28"},"0.3.3":{"tag":"0.3.3","author":"michaeltyson","date":"2009-06-16 08:27:10"},"0.3.4":{"tag":"0.3.4","author":"michaeltyson","date":"2010-06-26 14:20:10"},"0.3.5":{"tag":"0.3.5","author":"michaeltyson","date":"2010-07-04 10:23:47"},"0.4":{"tag":"0.4","author":"michaeltyson","date":"2010-07-18 18:58:49"},"0.4.1":{"tag":"0.4.1","author":"michaeltyson","date":"2010-07-18 20:09:58"},"0.4.2":{"tag":"0.4.2","author":"michaeltyson","date":"2010-07-18 21:42:00"},"0.4.3":{"tag":"0.4.3","author":"michaeltyson","date":"2010-08-31 15:08:08"},"0.4.4":{"tag":"0.4.4","author":"michaeltyson","date":"2010-09-03 14:06:19"},"0.5":{"tag":"0.5","author":"michaeltyson","date":"2010-09-14 19:15:43"},"0.6":{"tag":"0.6","author":"leonstafford","date":"2020-11-24 02:27:32"}},"upgrade_notice":{"0.6":"<p>Fix deprecation warning in admin UI. Bump WP support to 5.6.<\/p>","0.5":"<p>This version revises the search algorithm to provide better results<\/p>","0.4":"<p>This version introduces prioritising of things to search for, and fixes a redirection bug, causing an infinite redirect.<\/p>"},"ratings":{"1":1,"2":0,"3":0,"4":0,"5":3},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["0.2","0.3","0.3.1","0.3.2","0.3.3","0.3.4","0.3.5","0.4","0.4.1","0.4.2","0.4.3","0.4.4","0.5","0.6"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[905,925,944],"plugin_category":[],"plugin_contributors":[80454,78125],"plugin_business_model":[],"class_list":["post-3767","plugin","type-plugin","status-closed","hentry","plugin_tags-905","plugin_tags-redirection","plugin_tags-search","plugin_contributors-leonstafford","plugin_contributors-michaeltyson","plugin_committers-leonstafford","plugin_committers-michaeltyson"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/smart-404.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>Save your visitors from unhelpful 404 errors!<\/p>\n\n<p>Instead of quickly giving up when a visitor reaches content that doesn't exist, make an effort to guess what they were\nafter in the first place.  This plugin will perform a search of your posts, pages, tags and categories, using keywords from the requested\nURL.  If there's a match, redirect to that content instead of showing the error.  If there's more than one match, the\n404 template can use some template tags to provide a list of suggestions to the visitor.<\/p>\n\n<p>See the <a href=\"http:\/\/michael.tyson.id.au\/smart-404\">Smart 404 homepage<\/a> for more information.<\/p>\n\n<h3>Template tags<\/h3>\n\n<p><em><code>smart404_has_suggestions<\/code><\/em><\/p>\n\n<p>Returns true if there are some suggestions, false otherwise<\/p>\n\n<p><em><code>smart404_get_suggestions<\/code><\/em><\/p>\n\n<p>Retrieve an array of post objects for rendering manually.<\/p>\n\n<p><em><code>smart404_suggestions<\/code><\/em><\/p>\n\n<p>Draw a list of suggested posts.<\/p>\n\n<p>Pass the parameter \"list\" to render suggestions as a list.<\/p>\n\n<p><em><code>smart404_loop<\/code><\/em><\/p>\n\n<p>Query posts for use in a Loop. Eg:<\/p>\n\n<pre><code>&lt;?php smart404_loop(); ?&gt;\n&lt;?php while (have_posts()) : the_post(); ?&gt;\n    &lt;h2&gt;&lt;a href=\"&lt;?php the_permalink() ?&gt;\"&gt;&lt;?php the_title(); ?&gt;&lt;\/a&gt;&lt;\/h2&gt;\n    &lt;?php the_excerpt(); ?&gt;\n&lt;?php endwhile; ?&gt;\n<\/code><\/pre>\n\n<p>Note that the loop will not display pages correctly, as it is not built to support them. It is recommended that if you use\na loop like that above, do not enable searching of pages.<\/p>\n\n<p><em><code>smart404_get_search_terms<\/code><\/em><\/p>\n\n<p>Retrieve an array of search terms used to populate the suggestions list, for use with contextual highlighting, etc.<\/p>\n\n<p>For support and latest source code, please visit https:\/\/github.com\/leonstafford\/smart-404<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Unzip the package, and upload <code>smart404<\/code> to the <code>\/wp-content\/plugins\/<\/code> directory<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress<\/li>\n<li>Place <code>&lt;?php smart404_suggestions() ?&gt;<\/code> in your 404 template to list suggested posts, or see 'Template tags' for more information.<\/li>\n<\/ol>\n\n<!--section=changelog-->\n<h4>0.6<\/h4>\n\n<ul>\n<li>fix deprecation notice<\/li>\n<li>add GitHub repo as communications point<\/li>\n<li>update plugin's WP readme file<\/li>\n<li>bump WP supported version<\/li>\n<\/ul>\n\n<h4>0.5<\/h4>\n\n<ul>\n<li>Revised search algorithm<\/li>\n<\/ul>\n\n<h4>0.4.4<\/h4>\n\n<ul>\n<li>Bugfix to avoid clobbering page search results when pages are prioritised over posts (Thanks to Mark Foxwell for the catch)<\/li>\n<\/ul>\n\n<h4>0.4.3<\/h4>\n\n<ul>\n<li>More robust pattern matching - works with .php URL extensions, and works better with underscores.<\/li>\n<\/ul>\n\n<h4>0.4.2<\/h4>\n\n<ul>\n<li>Removed errant debug statement<\/li>\n<\/ul>\n\n<h4>0.4.1<\/h4>\n\n<ul>\n<li>Now actually fixed redirection bug, missed in 0.4<\/li>\n<\/ul>\n\n<h4>0.4<\/h4>\n\n<ul>\n<li>Added prioritising of pages, posts, tags and categories for search<\/li>\n<li>Added a new template tag to retrieve search terms<\/li>\n<li>Fixed redirection bug (thanks Emil Janizek!)<\/li>\n<\/ul>\n\n<h4>0.3.5<\/h4>\n\n<ul>\n<li>Don't get confused by URL parameters<\/li>\n<li>Maintain GET parameters<\/li>\n<\/ul>\n\n<h4>0.3.4<\/h4>\n\n<ul>\n<li>Slightly smarter post matching - now matches against post title, even if post slug differs<\/li>\n<\/ul>\n\n<h4>0.3.3<\/h4>\n\n<ul>\n<li>Bugfix for when no replacement patterns are specified<\/li>\n<\/ul>\n\n<h4>0.3.2<\/h4>\n\n<ul>\n<li>Better URL filtering to work with URLs including \/trackback, \/feed, etc<\/li>\n<\/ul>\n\n<h4>0.3.1<\/h4>\n\n<ul>\n<li>Trim whitespace from search in order to obtain more results in some circumstances<\/li>\n<\/ul>","raw_excerpt":"Automatically redirect to the content the user was most likely after, or show suggestions, instead of showing an unhelpful 404 error.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ko.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/3767","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ko.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/ko.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/ko.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=3767"}],"author":[{"embeddable":true,"href":"https:\/\/ko.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/michaeltyson"}],"wp:attachment":[{"href":"https:\/\/ko.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=3767"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/ko.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=3767"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/ko.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=3767"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/ko.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=3767"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/ko.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=3767"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/ko.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=3767"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}