1

I'm building a site for a client with a large navigational structure. I think it would be easiest for them to manage if the pages were listed hierarchically in the admin panel, but it would also be better for their SEO for the permalinks to be shorter. Right now, they have some pages with beastly URLs like this:

www.example.com/company/sustainability/environmental-footprint/recycling-programs/

Ideally, I'd like to be able to change the permalink structure for pages to be more flat. But I'd really like the highest parent to be present in the URL too. So in this case, the URL for the above page would be:

www.example.com/company/recycling-programs

I know that it is possible to put some functions inside the theme's functions.php file that customize the rewrite structure but I'm not really sure where to start.

Note:

I saw the solution proposed here, but it's not really what I'm looking for. WordPress is already redirecting to the correct page when I type in

www.example.com/company/recycling-programs

I'd like the permalink to appear as the shortened version by default instead.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.