Changing the slug in Easy Digital Downloads

When using Easy Digital Downloads to sell your digital products, each download has a URL that looks like this:

http://mywebsite.com/downloads/my-download/

Note the downloads in the URL above. This is the default slug that Easy Digital Downloads creates. Depending on what you are selling, you may wish to change this to better suit your needs. If you are selling music, it would be better to change it to something like music or albums.

Luckily this is very easy to do. Simply add the following to your theme’s functions.php:

if ( ! defined( 'EDD_SLUG' ) ) {
    define( 'EDD_SLUG', 'my-new-slug' );
}

Replace my-new-slug in the example above with your new slug. Finally, it’s a good idea to visit the Permalinks admin page so you don’t get the dreaded “page not found” when viewing downloads with your new slug. Go to Settings → Permalinks in the WordPress admin which will flush the rewrite rules.

17 thoughts on “Changing the slug in Easy Digital Downloads”

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

  2. (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.

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

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

        1. 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”.

Leave a Reply

Your email address will not be published. Required fields are marked *