From what I recall, if a page is a child of another page, the pagename value is the full parent / child path. In your examples it would be pagename=questions/ask
and pagename=questions/ed
, though you say the first rule works, which is puzzling.
also, side note – there’s a locate_template
function that will correctly handle parent / child themes.
Related Posts:
- Post/Page Preview Template
- Custom permalink structure only for default posts
- Is it possible to have two different previews of a post (ie. two templates for one post)?
- Display page content AFTER a loop of posts
- Using custom post template
- Custom Post Type – Category Rewrite – Remove Rewrite from Sitemap
- Duplicate Custom Post Type and Taxonomy Slug
- custom post template file not shown, instead all the time 404.php
- How do I Redirect a WordPress Page?
- Tell WP to use a specific template file in posts
- Create a custom posts page
- Custom Post Type, post-formats associated to custom post type > 404 archives
- How to allow WordPress to recognize a custom URL segment after a product URL and use a custom template?
- Redirect to custom post if custom archive page has just one result?
- how to redirect page after delete post inside a post page?
- Custom post type template not called
- single- and archive- templates not being applied to custom post types, not even after flushing permalinks
- issue in wordpress auto delete post and redirect to another 1
- Adding The Post Template Dropdown to WP-Admin
- custom post type single page template not working
- Post pages are redirecting to the 404 page in wordpress
- Custom Post Archive Page not working
- Hiding Draft Post In Admin
- Print all the tags from a custom post type Please
- What is the filter or hook to add admin controls to posts on the front end?
- Display multiple custom taxonomy values on single custom post types page?
- Setting posts_per_page for taxonomy term template
- Adding custom fields to bbpress reply form
- Move first half of posts to one parent page, second half to the other page
- Adding buttons to Add New Post and Add New Page
- CPT archive redirects to single post
- Relative redirects for posts, categories, products and product categories
- Show posts by a custom post author
- Custom loop pagination links not working
- Prevent Delete Attachment by URL or When Submit
- Enable Comments Box On Custom Post Type
- wp-cli post create & media import issues
- How can i limit the number of posts created per category?
- Search results posts_orderby and ID
- Getting Custom Post Loop to display in Bootstrap 3 column grid
- Turn On Comments On Custom Post Types in Directory Theme
- WordPress custom Query for Posts in Category display posts multiple times
- Responsive images with custom image size
- Making a custom Pagination for multi page blog post
- ERROR: Your feed is invalid (after update WP4.7) in custom types
- Switch to page template when using post permalink
- Editing the default page to show all posts, rather than most recent ones
- Unable to restore from backup – how to obtain old blog posts?
- 301 (static page instead latest posts)
- Genesis + Ajax + Jquery | Failling to call action
- Automatically add date to the auto generation of post slug
- Permission issue with custom post type – not added to menu – by plugin
- Get Page ID of blog homepage
- How could I change my Permalink from blog to custom structure? [closed]
- Visting slug for ‘post’ post type shows 404 not archive?
- Remove Custom Post Type Slug and add Custom Taxonomy to Permalink Structure?
- Take a received feedback item, turn it into a post
- Getting value from get_post_custom
- WP Admin register taxonomy and post type performance
- Send post id through ajax and get the post content back
- Add a custom meta box in the post options that loads some html code in the header
- Static posts page with home.php
- Calling Different Custom Post Timestamps in a table
- WordPress Multisite – Create Default Post and New Category On New Site Install
- Admin – create custom post status and display above table
- Set static page/post from another blog on same network
- Set Default Category to Username
- How to allow visitors to filter posts by multiple taxonomies
- show custom post type category dropdown sorting result on same page
- Custom Post Type Rewrite To Include Parent Page(s)
- How to create new post content templates for my users?
- Thumbnail & Category link aside post
- redirect to uploaded (wordpress) post after form submission from front-end
- How to create a template for Pages?
- How do I stop the loop from repeating in my category template?
- How To Load an HTML File As A WordPress Page (With No 301/No Redirect)
- When changing pages to posts, how do you set up 301 redirects for the page URLs?
- How to include my own css in post
- Custom post types related to same custom post type?
- How do I insert a post with custom post type and relate it to a custom taxonomy?
- Dynamically switch template on click
- posts not showing on index.php
- “about us”, ” contact” sections should be article(post) or page in the simple small Business website?
- Is it possible to customize the post according to post format in single.php?
- Customize rel=canonical tag for single blog post
- a little direction on custom post type
- disable Tab post on nav-menus page (Admin)
- Hide a specific post from a page template
- Format latest/newest post differently
- Custom taxonomy archive page problem
- Is there a way to create a meta box that can be added multiple times to a post dynamically?
- relating business and products with custom taxonomy?
- Best Way to Add UnEditable HTML to Posts
- How to make different custom post layouts?
- How safe is it to delete old posts edits to save database space?
- Two Custom Post Types with Identical Articles Competing for the same Slug
- Custom Post Type archive
- WordPress custom post type with folder structure in slug
- Using setup_postdata() with multi-dimensional array
- Is codex right on deleting post?