WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. Natalya Murphy
    Member
    Posted 3 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);
            			exit();
            		}

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

    http://wordpress.org/extend/plugins/smart-404/

  2. WPITn2shape
    Member
    Posted 3 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags