WordPress.org

Support

Support » Plugins and Hacks » Random Redirect 2 » [Plugin: Random Redirect 2] Idea: Support custom taxonomies

[Plugin: Random Redirect 2] Idea: Support custom taxonomies

  • I’m about to make a website that uses custom taxonomies as an integral part of the navigation. A useful feature would be to have Random Redirect 2 support those custom taxonomies with for example this type of URL argument: custom_taxonomy_1_name=subsites&custom_taxonomy_1_value=subsite65 where the choice is limited to posts that are tagged as subsite65 in the custom taxonomy subsites.

    This way it is easy to support an unlimited amount of custom taxonomies. In the plugin, use something like:

    $i = 1;
    while ( $i < 99 ) {
      if ( ! isset($_REQUEST['custom_taxonomy_' . $i . '_name']) ) {
        break;
       } else {
         add_search_attribute();
         $i++;
      }
    }

    http://wordpress.org/extend/plugins/random-redirect-2/

Viewing 1 replies (of 1 total)
  • An even better option is to let the users specify the name and limiting value of the taxonomy in the same sentence and then just go through all the arguments of $_REQUEST[] as an array and parsing those that match the correct format.

    For example: custom_taxonomy_subsites=subsite65&custom_taxonomy_author=author72.

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Random Redirect 2] Idea: Support custom taxonomies’ is closed to new replies.
Skip to toolbar