• Hi all,

    I was wondering what the most efficient way of adding a new route to the WP URL structure would be?

    I am developing a custom theme and I want to enable editing, duplication and deleting posts on the front end. My initial thoughts were that the correct way to do this was to create edit.php, and delete.php and have all urls with domain.com/edit/post-slug, /duplicate/post-slug and /delete/post-slug point to them.

    I don’t understand permalinks almost at all but I imagine I need to edit htaccess somehow to make this happen? Then in the PHP script /post-slug becomes a variable I can use to get the ID, etc.

    Please let me know what you think!

    Best regards,
    Andrei Goea

    • This topic was modified 7 years, 9 months ago by andreigoea.
  • The topic ‘Create a new /edit/ route for front end’ is closed to new replies.