This tutorial will show you how to change a product’s URL in Easy Digital Downloads from this:

https://website.com/downloads/name-of-download/

To this:

https://website.com/products/name-of-download/

Note the downloads in the first example above. This is the default slug that Easy Digital Downloads uses.

The following code example shows how you can change the slug to products. Add the following to your theme’s functions.php:

if ( ! defined( 'EDD_SLUG' ) ) {
	define( 'EDD_SLUG', 'products' );
}

Depending on what you are selling, you may have another desired slug in mind. To use your own slug, replace products in the code above.

Finally, visit the Permalinks admin page in WordPress so you don’t get the dreaded “page not found” when viewing your downloads.

Go to Settings → Permalinks in the WordPress admin which will flush the rewrite rules.

Enjoy your beautiful new product URLs!

22 comments

  1. Andrew Munro
  2. Andrew Munro

    It’s a small detail, but I love it. I just changed my slug to ‘tutorials’, which is more appropriate. Thanks!

  3. Andrew Munro

    (Sorry, wrong email on the post above)
    Is there a work-around to have multiple slugs for one post type?

    For example an EDD shop that might have a structure like: /themes/theme-name, /plugins/plugin-name, and /services/this-is-my-service but all use the EDD downloads template.

    1. Unfortunately no. It was going to be implemented for EDD 2.0 but we decided against it (opening up a can of worms). The best/simplest way is to organise your downloads by category, and keep the one slug.

  4. Andrew Munro

    hi, it’s possible to make a multi slug please?

    For example, mywebsite.com/free-download/ and mywebsite.com/premium-download/

    1. Andrew Munro
        1. Andrew Munro

          Thank you, and can i make this for example : mywebsite.com/download/free-download and mywebsite.com/download/premium-download ??

          1. Yes, you can use the code above to set “download” as your slug, which will give you the URLs you are after. By default it’s “downloads”.

  5. Andrew Munro
  6. Andrew Munro
  7. Andrew Munro
  8. Andrew Munro
  9. Andrew Munro

    Hi. could you tell me please, how can I change the botton? For example, I would like to use my own graphics button, witch will redirect to checkout

  10. Andrew Munro

    Hi,
    thank you for sharing your knowledge. Do you have idea is it possible to renames slugs for different products such as photography and audio? I would be more that impressed if you can help me out with this one. 🙂

    Cheers

  11. Andrew Munro
  12. Andrew Munro

    Hello, I need a help,

    I am using a digital products theme as services, like : Keyword research services …

    # Example link: http://www.example.com/downloads/keyword-research-service/

    Can i make it , like this : http://www.example.com/services/keyword-research-service/

    I mean Services instead of downloads in URL section…..

    Note: i can change other section in URL by general WordPress URL edit option but can not change /downloads/ part.

    How can i do it ? Please help….

    Thanks
    Hasan

Comments are closed.