Smart 404
[resolved] Great 404 tool (2 posts)

  1. Natalya Murphy
    Posted 4 years ago #

    This plugin does a great job of finding relevant content based on the submitted URL. I noticed the smart404_redirect() had a slight issue with it. If it found exactly one search result within a specific search type (page, post, category or tag), it stopped doing any further searches and immediately redirected the visitor to the page it found.

    I modified the function by commenting out all 4 instances of the following code. This resulted in the function going through all search categories and generating a complete list:

    if ( count($tags) == 1) {
         wp_redirect(get_tag_link($tags[0]->term_id) . $get_params, 301);

    I also changed the smart404_suggestions() parameter from 'flat' to 'list' so the search results would come up in a bulleted list.


  2. WPITn2shape
    Posted 4 years ago #

    Thanks for the "flat" vs. "list" tip!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Smart 404
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic