• Hi,

    I created a custom taxonomy called Games
    Under it I have a term to list all the games on the website called Games
    Also I have a term for each game
    Games taxonomy, GTA term and so on.
    In my child theme I use taxonomy.php to know which game to view, or shall I view a list of games.
    I want to view the list of games like this
    site.com/games/ and not site.com/games/games
    So I did this working rewrite rule
    $new_rules = “games/?$” => “index.php?games=games”;
    The problem is the game term’s page is still recognized as site.com/games/games/ by other plugins like polylang for example.
    I want to force word press to accept site.com/games/ only to reach the term games in taxonomy games.

    Any help is greatly appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • try when declare post type set correct rewrite rule:

    // Register Custom Taxonomy
    //previous to declare cpt…

    $rewrite = array(
    ‘slug’ => ‘games’,
    ‘with_front’ => true,
    ‘hierarchical’ => true,
    );


    //rest of code

    Thread Starter ranbos

    (@ranbos)

    Thank you. But I am already doing that.
    The result is expected when I add no re-write rules.
    site.com/games will be 404. but site.com/games/games will get the page for the term games in taxonomy games.
    I am doing the re-write to have site.com/games/ site.com/index.php?games=games
    This is working, but the problem is site.com/games/games/ is still working, and I want to prevent it from working.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Change custom taxonomy term permanent url’ is closed to new replies.