If, from within single-films.php
you filter based on the parent post you should have little issue with this. For example:
if( $post->post_parent != 0 ) {
// not top level
} else {
// top level page
}
If you need to know how deep the page is, that’s a different matter, but that’s also doable (unfortunately it means you need to query the database though).
Related Posts:
- A case for Hierarchical Custom Posts
- Templates for hierarchical custom post type
- Specifying Default Template for Hierarchal Custom Post Type [duplicate]
- How to create a permalink structure with custom taxonomies and custom post types like base-name/parent-tax/child-tax/custom-post-type-name
- How to set parent-child relationship between differents custom post types
- display different template based on post type
- Change custom post type to hierarchical after being registered
- previous_post_link() and next_post_link() with a custom post type?
- How to pass URL parameters for advanced taxonomy queries with multiple terms for one custom taxonomy
- Setting a custom sub-path for blog without using pages?
- How to add custom content template part for a custom post type on main query using a plugin
- Custom Post Type as Page parent
- How to handle a hierarchy with custom post types
- How do I display two separate taxonomy archives for two post types that share a single taxonomy?
- How to set a fall back template for a custom post type in a plugin?
- Page is defaulting to archive page and not designated template
- How to list/show all custom post types regardless of category?
- How to query custom posts using a dynamic category
- Custom Post Type ‘hierarchical’ Help!
- Custom Post Type with Nested Taxonomy and Template Files
- How to show term-specific post list, without posts associated with child terms?
- Create Pages from Database
- How to query for posts (in hierarchical custom post type) that have children?
- Custom post type loops with different page templates
- Include different loop templates in search query
- Custom Post Type .current-menu-item not applying on Custom Post Type Archive Page
- Parent / Child formatting in a list of post of a custom post type
- How to Combine Two Custom Post Types into Single Permalink Structure
- Custom Posts Hierarchy? (State/City/Restaurant)
- Hierarchical Custom Posts – Highlighting Current Post in Sub-Menu
- Multiple templates for a custom post type
- Modifying Custom Post Type after registration (will it affect content?)
- Hierarchical Custom Post Types in Array
- Query with no terms uses index.php template instead of archive.php
- Need help with permalink rewrites for Custom Post Types with hierarchical relationships
- WordPress Doesn’t Generate Taxonomy Archive
- Get the taxonomy of a post hierarchically
- Filter widget outputs
- Adding Page Templates to post but it ignored it
- Custom Post Types hierarchy and rewrite
- Custom post type / taxonomy rewrite archive page 2 gives 404
- Hierarchial Custom Post Types/Taxonomies
- Hierarchical permalinks for custom post type and taxonomy
- using wp_update_post for updating custom post type
- WordPress custom taxonomy template not working
- Create a permalink structure with custom taxonomies and custom post types gives 404
- How to specify a template for a path like http://example.com/something?
- WordPress 3.9 not using custom template
- How to Create Template File for Parent Page of Custom Post Type
- Custom post_type search pages
- how to remove pages loading with the archive templates
- Custom Empty Results page for my Custom Post Type
- Is it safe to change a Custom Post Type from “hierarchical:false” to “hierarchical:true”?
- Loop through custom posts by taxonomy and display the titles in a list, it is repeating 8 times
- get parent content inside child posts
- Custom post types with categories in template
- How can I trace inconsistency in loading a template?
- Assigning alternate single-{cpt} template based on blog_id in multisite
- How to query for posts (hierarchical custom post type) that have children but are NOT top level?
- assign different templates to custom post type with homepage loop
- Migrating Hierarchal Taxonomy Categories Between Post Types
- Add search to ‘Parent’ dropdown
- Get template part with CPT and Custom Taxonomy conditionals
- Custom permalink structure for remote content pages
- Custom post type draft use wrong template
- Custom post type hierarchical loop in Homepage
- How can I add in post’s the text “No content”
- How to customize `Edit-Post` Screen
- Calling a div and content in php?
- Tag template not returning posts [closed]
- Specifying a template for custom post type pages
- Custom post type set default template using block editor
- How to set a ‘page’ as parent of a custom post type?
- Permalink with hierarchy of Custom Post Types
- A certain theme is forcing it’s singular post layout
- Post template not applying on theme (potentially rendering as Page template)
- Custom Post Taxonomy Template Not Loading Properly
- Is it possible to link an external stylesheet, exclusively within a specific single post template?
- Attempting to get number of grandchildren of page in WP_Query loop
- Templating advice sub posts of a CTP
- Custom post type option page template
- Create a Hierarchical List of Custom Taxonomies AND Posts
- Taxonomy template file not working with a taxonomy that contains a slash
- How to override post-new.php with custom template
- How can I find out what template is my custom post type using?
- Can I organise my custom post types by page?
- Display posts of a hierarchical custom post type excluding parent posts
- Hierarchical Custom Post Type Walker?
- I want to create an archive and single page for a custom taxonomy for a custom post type
- Redirect to different template other than single-custompost.php
- WordPress Custom taxonomy template
- custom post type plugin – single template
- How can I pull information from my loop and divide them seperately?
- Storing postID in session variable to query database when visitor on custom template page
- How to make a template for a specific post of a custom post type?
- Hierarchical Custom Post Types
- WP_Query is getting the post but the_post() not rendering any Post
- Apply text based styling done for a single post in WPBakery to all posts / create a template out of it [closed]
- Custom Post Types using wrong template (index) instead of archive-{type}.php – previously worked as expected
- Why isn’t page attributes dropdown not showing up in a custom post type