Support » Requests and Feedback » Optional <index.php> override in categories

  • Is it possible do add an extra field in the categories (admin) section to override the default page (index.php) so that when choosing that category the specified .php file is loaded instead of the default?

Viewing 3 replies - 1 through 3 (of 3 total)
  • I don’t think so, but you could manually enter the catagories in the menu section rather than dynamaciallly generating them through WP. That way, you can have the link go to any .php file you want.

    Not sure if something like this would help, but say you wanted to redirect category 3, you could try this in your index file:
    if ($_GET[‘cat’] == 3) {
    $redirect_to = get_settings(‘siteurl’) . ‘/whatever.php’;
    header (“Location: $redirect_to”);
    } ?>

    Thanks Beel!
    Now how would you modify that to redirect to the right .php file when requesting a single article. We need to extract the category to which the article belongs first, right (and how)?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Optional <index.php> override in categories’ is closed to new replies.