[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Wordpress and Pages Permalinks

Posted on 2011-10-28
8
Medium Priority
?
789 Views
Last Modified: 2012-05-12
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.
0
Comment
Question by:DLC123W
6 Comments
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 37049045
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.
0
 
LVL 10

Expert Comment

by:Jini Jose
ID: 37049095
0
 

Author Comment

by:DLC123W
ID: 37050197
@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.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 31

Accepted Solution

by:
gwkg earned 1000 total points
ID: 37067282
0
 
LVL 2

Assisted Solution

by:Ryan Bayne
Ryan Bayne earned 1000 total points
ID: 37224032
The other approach is not adding them too Fruits as child pages. Change your theme to show "Fruits" title and list the children using their ID. This would save the use of a plugin which is important to consider for the long run.

Another thing is the difference between pages and posts is only how you percieve them other than how Wordpress treats them in Admin. You can make a page look exactly like a post visually and in source code. You do not need to use posts in a blogging fashion but usually it does mean some customizing to your theme which is better than using plugins if your site won't change much once complete.

If your not in a position to be changing your theme, then a plugin will do the job plugins were meant for. Low costing and easy to install.
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 37693330
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
The purpose of this video is to demonstrate how to reset a WordPress password if you are locked out and cannot reset the password. A typical use would be if you cannot access the email to which WordPress would send the password recovery email to…
The viewer will learn how to dynamically set the form action using jQuery.
Suggested Courses
Course of the Month19 days, 18 hours left to enroll

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question