WordPress.org

Ready to get started?Download WordPress

Forums

Random Redirect 2
Idea: Support custom taxonomies (2 posts)

  1. Daedalon
    Member
    Posted 2 years ago #

    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/

  2. Daedalon
    Member
    Posted 2 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic