How to change portfolio URL
How to change the portfolio slug (URL)
Before making any edits to your PHP files, please make sure that you have access to the File Manager in your cPanel or FTP. PHP is incredibly sensitive and if a mistake is made, it can cause the "white screen of death" on your site. Having easy access to your File Manager means you can easily upload a fresh copy of your theme if the need arises.
1. Go to WordPress > Appearance > Editor > Functions.php.
2. Find this section in the file:
Please note that this code will look will look slightly different on your end. Instead of child, you will see your theme name.
3. There are three places highlighted in the image that you will need to change.
- The first one changes the page title in the browser tab
- The second one changes the portfolio tab in your WordPress dashboard
- The third one changes the slug (URL) of your portfolio page
4. Replace each highlighted word with your chosen new title/word. Be VERY careful to leave the apostrophes on either side of the word. Click Update File when you're done.
As an example, if you are wanting to change Portfolio to Gallery, this is what that would look like:
5. Lastly, go to Settings > Permalinks. Click Save Changes (but do NOT change anything). This will reset your permalinks and update the new URL.