Link to home
Start Free TrialLog in
Avatar of DLC123W
DLC123W

asked on

Wordpress and Pages Permalinks

This has to do with PAGES (Not Posts) within Wordpress.

If I create a Page called "Fruit", the URL is http://www.domain.com/fruit

If I create s Sub-Pages of Fruit called "Apples" and "Oranges", the URL's would be
http://www.domain.com/fruit/apples
http://www.domain.com/fruit/oranges

How can I get it so that no matter how many Sub-Pages deep a page is, the Slug is always just that page.

The URL's of those three pages would be:
http://www.domain.com/fruit
http://www.domain.com/apples
http://www.domain.com/oranges

In other words, I do not want the parent slug(s) to be a part of the url.  I want the domain name, and page only.

I've tried the "Custom Permalinks" plugin (as well as several other plugins) but none of them are automatic.  If you submit a page without editing the Permalink, you get the full parent/child slug as the address.

Settings in Wordpress >> Settings >> Permalinks only apply to Posts, not Pages.

Thanks in advance to all that can help.
Avatar of Jason C. Levine
Jason C. Levine
Flag of United States of America image

What you're asking for is part of the WordPress core behavior.  The fix is to hack the core which means you will have to replace the code every time you update WordPress.  The Custom Permalinks plugin is the best solution.
Avatar of DLC123W
DLC123W

ASKER

@gmailjini:
I checked out the link but it does not provide the functionality that I need.  Yes, Pages allow you to edit the Permalink in the page editor, but only for that specific part of the page - it does not allow you to remove any parent slugs that have been added - as referenced in my original post.

@jason1178:
I do like "Custom Permalinks" plugin but the problem is that it is not automatic.  If I had the site over Editors to add/administer content - should they forget to enter the Custom Permalink, then the Wordpress Default kicks in.  I like the fact that Wordpress creates the semi-hierarchy permalink, I just wish there was the option to not have all the parent pages as part of the slug.  When you have pages three and four levels deep, the URL can become very long.

@everyone:
I don't mind if it is a wordpress hack - if someone knows how to do it.  I am the only one with the capabilities to upgrade the site and its plugins.  I just don't want to be in a position where the URL's get to be super long because of all the parent slugs added into the URL.

What urkes me is that we can change the permalinks so easily for Posts.  Why wordpress has forgotten about Pages and this ability, is beyond me.
ASKER CERTIFIED SOLUTION
Avatar of gwkg
gwkg
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.