Community Forums › Forums › Archived Forums › Design Tips and Tricks › Business Pro – Rename slug "portfolio" [Page + post]
Tagged: business pro, Portfolio slug
- This topic has 19 replies, 2 voices, and was last updated 4 years, 9 months ago by
AnitaC.
-
AuthorPosts
-
April 29, 2020 at 9:52 am #498281
mcreat
MemberHi! I'd like to use the functions of 'Portfolio page + posts' but rename the slug. Anyone could help me? Thanks!
April 29, 2020 at 10:15 am #498282AnitaC
KeymasterApril 29, 2020 at 10:21 am #498285mcreat
MemberThank you Anita.
I already checked this out, but just renames the post (not the page).April 29, 2020 at 10:30 am #498286AnitaC
KeymasterI am not understanding what you need then. You want to change the slug from /portfolio to /something-else, correct? If not can you present a link to what you are referring to?
Need help with customization or troubleshooting? Reach out to me.
April 29, 2020 at 10:46 am #498288mcreat
MemberThis is a demo of the Business Pro Theme: https://my.studiopress.com/themes/business/#demo-full
If you go to portfolio, you can see all the items. This is a demo but in a webpage the URL would be: studiopress.com/portfolio
Once inside when you click one of the items, for instance "typography", you get the URL: studiopress.com/portfolio/typography.So with the provided code, it changed the second one. For instance: studiopress.com/work/typhography, but doesn't change the first one. So the functionality is broken.
Thanks!
April 29, 2020 at 12:01 pm #498289AnitaC
KeymasterI am still confused.
https://demo.bizbudding.com/business-pro/portfolio/
There's the Business Pro demo. My tutorial will change that to:
https://demo.bizbudding.com/business-pro/work/
That's how that should work, so what isn't it doing on your website?
Need help with customization or troubleshooting? Reach out to me.
April 29, 2020 at 12:05 pm #498290AnitaC
KeymasterIn your example, it changes the portfolio to work. Which is what it's supposed to do because that's the portfolio "slug".
So with the provided code, it changed the second one. For instance: studiopress.com/work/typhography, but doesn't change the first one. So the functionality is broken.
Need help with customization or troubleshooting? Reach out to me.
April 29, 2020 at 12:43 pm #498291mcreat
MemberI'm sorry. It doesn't work. It still shows studiopress.com/portfolio and studiopress.com/work/typography. Both. The first is a page, the second is a post. So it changed the post but not the page.
Thanks anyway!April 29, 2020 at 4:11 pm #498295AnitaC
KeymasterIf you have something in the portfolio called "typography" you just need to change the page name of the page itself. Open up that page and rename the slug that would be equal to typography.
We really need to see your site to visually help you. The StudioPress site may not be a good example of what you are referring to.
Need help with customization or troubleshooting? Reach out to me.
April 30, 2020 at 7:57 am #498310mcreat
MemberThanks Anita!
I will begin from scratch.
1) Does it work after I import the demo data?
2) Do I need to change something on pages or menus?April 30, 2020 at 8:12 am #498311mcreat
MemberThe Portfolio plugin has a page studiopress.com/portfolio where it shows all the items. That page doesn't change with the code. But if I click one of the items, then it changes with the code to studiopress.com/work/typography.
So the problem is with the main page where you see all the items.
Not sure if I have to change something on the menus o pages...April 30, 2020 at 8:34 am #498315AnitaC
KeymasterI just added my code to my demo here which is not Business Pro. If you click the one portfolio item - look in the address bar, the gallery remains in the address bar.
Are you saying that your URL switches from /work back to /portfolio when you click the URL?
I'm sorry... if you don't give us an actual working website and point us where things are not working, you are asking us to fumble around in the dark.
Need help with customization or troubleshooting? Reach out to me.
April 30, 2020 at 9:12 am #498317mcreat
MemberIt's live for you to see it. Go please at : https://acrefa.cat
The code is already in functions.
If you click "portfolio" the URL IS: https://acrefa.cat/portfolio/
If you then click one of the items (typography for instance), the URL Is: https://acrefa.cat/work/typographyThe goal is to go from acrefa.cat/portfolio to acrefa.cat/work
Thanks
April 30, 2020 at 9:30 am #498318AnitaC
KeymasterIf you updated my code to say /work - then this should work - https://acrefa.cat/work/ but it does not work. That is the slug my code is changing.
In my code - line 13 is the only place you need to change something. Where it says
your-new-name
you need to change that towork
. That's it.
Need help with customization or troubleshooting? Reach out to me.
April 30, 2020 at 9:32 am #498319mcreat
MemberThat's what I did. But you can see it doesn't work. Only with items, but not in the archive.
Is there any code that I can add to the plugin itself or related to the archive?April 30, 2020 at 9:33 am #498320mcreat
MemberPerhaps it doesn't work with the Business Pro Theme.
April 30, 2020 at 10:15 am #498321AnitaC
KeymasterYeah maybe. If you go to Portfolio, click Archive Settings. There's a link there. What does that link say?
Need help with customization or troubleshooting? Reach out to me.
April 30, 2020 at 10:21 am #498322AnitaC
KeymasterAnd you
did
go to Settings > Permalinks and re-saved them? Sometimes you have to re-save them for the links to work properly.
Need help with customization or troubleshooting? Reach out to me.
April 30, 2020 at 11:30 am #498325mcreat
MemberAnita, thank you very much for your help. Indeed, it was that. I re-saved the permalinks and it works.
I truly appreciate it.
Have a lovely day!
M.April 30, 2020 at 12:11 pm #498327 -
AuthorPosts
- The topic ‘Business Pro – Rename slug "portfolio" [Page + post]’ is closed to new replies.