Change Easy Digital Downloads Labels and Slug

This video goes over how to change the “Downloads” label and slug to “Themes” throughout the plugin and theme. The labels are what you see in the WordPress dashboard and the slug is the URL.

This will allow us to navigate to http://yoursite.com/themes instead of http://yoursite.com/downloads which is also nice!

Steps from the Video

  1. Go to the Easy Digital Downloads documentation and grab the function that changes the post type labels. You can find that code here.
  2. Create a new file called edd.php in the /inc/ directory and paste in the code.
  3. Replace all instances of “Products” to “Themes” and “Product” to “Theme”
  4. Replace the text domains from “your-domain” to match your theme text domain
  5. Include the new edd.php file in our main functions.php file with the following code:

  6. Refresh the WordPress Dashboard and notice the new labels!
  7. To change the URL slug go grab the EDD constant here
  8. Put this code in our edd.php file and change ‘my-downloads-slug’ to ‘themes’
  9. From the WordPress Dashboard go to Settings -> Permalinks and click Save
  10. Reload an individual theme on the front-end and notice your new slug!