Define a Permalink Structure by Post and Page

Since posts are not hierarchical and pages are – even if you’re linking to a page from a post, there’s nothing telling WordPress that they’re related. So the urls you’re going to get will be www.site.com/page or www.site.com/post.

If you’d like to relate them, you can either use Pages for both and take advantage of the hierarchy WordPress provides (see link below). Or you can have a custom post type and set the hierarchy parameter to true. You can also set your custom post type to behave like a page if that’s the reason why you’re trying to use post > page.

You may have other options, but I’m not sure what the circumstances are for your site, and why you’d be using a post and a page as two separate entities and trying to relate them. Perhaps if you can explain why you’re trying to build it as post > page, I can provide more options for you.

Also don’t forget about categories, if you’re using a post simply to have the url be www.site.com/something/gallery, you can also take advantage of categories.

Hope that helps!