Support » Fixing WordPress » URL Rewrite – Removing Permalink and reference to template

  • Resolved PurpleGirl


    Really hope someone can help me. I’m tearing my hair out right now.

    I created a permalink in wordpress using rewrite rules
    [Code moderated as per the Forum Rules. Please use the pastebin]

    Everything was fine, until I made the fatal mistake of copying the ‘product’ template and saving it as the ‘shop’ template, forgetting to change the template name from ‘product’ to ‘shop’. When I switched to the shop template it made no difference, the page still directs to the product template.

    If I navigate to – then the right shop template is displayed.

    But if I navigate to -it shows the product template

    I’ve tried everything, I’ve disabled the cache plugin, deleted the page, deleted the template, removed the rule, changed the rule, deleted all references to the shop page in the interface, using the WordPress delete function and I even checked the database directly and all references were removed, yet when I use the ‘my-site/shop/store-name/brand-name/product-name’, the page is still being found.

    I even tried changing:

    $newrules[‘shop/([^/]+)/([^/]+)/([^/]+)?$’] = ‘index.php?pagename=product&shop_name=$matches[1]&brand_name=$matches[2]&product_name=$matches[3]’;


    $newrules[‘shop/([^/]+)/([^/]+)/([^/]+)?$’] = ‘index.php?pagename=product&shop=$matches[1]&brand=$matches[2]&product=$matches[3]’;

    and that made no difference.

    I’ve searched high and wide for a solution and can’t find one. I want to be able to use the shop page, and don’t want to use another named page. Surely there must be a reference that can be deleted somewhere. Please can someone help…

    Thanks in advance


Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘URL Rewrite – Removing Permalink and reference to template’ is closed to new replies.