Custom Permalink (with category) for Pages

You would have to set up rewrite rules to achieve this goal. It has the potential to get pretty hairy.

Alternatively, to get the same benefits – where the URLs of your content are within categories, and each category has an archive – you could use custom post types.

For example, create an “apple” custom post type and an “orange” custom post type with archives. All of your individual “apple” posts will then have the URL http://example.com/apple/post-slug/, and your individual “orange” posts will have the URL http://example.com/orange/post-slug/.

Within your theme, create archive-apple.php and archive.orange.php (or even, if you prefer and if it works with the rest of your post types, just a single archive.php). These templates will automatically query for a certain number of that type of post, so all you have to do is put in your desired markup and a simple loop. You can get fancier if you wish, but it doesn’t have to be complicated.

This will allow you to have the archives and URL structure you’re trying to achieve without having to rewrite things or try to shoehorn in functionality that’s not in Core. However, note that these CPTs will not line up with your existing Posts and Pages, so you will need to go in and change the post type of existing content if you want the old content to appear in the same archives as your CPTs. It’s fairly easy, you just find the post IDs and change the post_type in the database from page (or post or whatever it was before) to the new post type, i.e. apple.