This is not a true solution to your problem (checking which template loaded another), but it will work to test if the footer has been loaded or not, and thus if it’s loading your partial:
if ( did_action( 'get_footer' ) ) echo 'footer-class';
Related Posts:
- Passing variables through locate_template
- How to use get_template_part()?
- Is there a variable for a template parts name?
- How to make get_template_part always check child theme first?
- Too many get_template_parts?
- get_template_part() does not work if you call it when you are in a subfolder
- Pass a variable to get_template_part
- get_template_part inside get_template_part?
- Getting the chosen template when iterating through pages
- Possible to use pagename inside get_template_part?
- Why would include(locate_template) work but not get_template_part()?
- How does get_template_part() work inside a loop?
- Is there a tirck in the get_xxxx function in the general_template.php file?
- Problem with using get_template_part() in footer
- how to remove get_template_part from a plugin? [closed]
- get_template_part() based on get_post_type() for a custom post type instead of get_post_format()
- Using get_template_part to retrieve a template file based on current post type
- add a hook with get_template_part()
- ä/ü/… are not displayed when including via get_template_part()
- Change the file path on get_template_part via plugin
- How to limit the number of Related Posts?
- get_template_part – how to find html file which is being render
- Get_Template_Part And Two Global WP_Query On Frontpage
- The use of get_template_part() returns ‘invalid argument’ loading options
- Passing a variable from the archive page to the default template
- For which reasons can get_template_part’s $args fail to work? (WP 5.8.1 – PHP 7.4.23)
- Can I set a global base path for get_template_part?
- how to use a different template (index.php) in wordpress
- What are the benefits of using get_template_part()?
- Include template file from plugin to theme
- get_template_part doesn’t output all data
- Passing a variable to get_template_part
- Is there any way to use get_template_part() with folders?
- How to include a file using get_template_part() in a plugin?
- get_template_part vs action hooks in themes
- Using a custom WP_Query with get_template_part loop
- Is it possible to override the result of get_template_part()?
- Should we use get_template_part() in functions files instead of include_once?
- When is get_template_part() preferable to simply using the template.php files?
- How to add custom content template part for a custom post type on main query using a plugin
- get_template_part from plugin
- Combining shortcode and get_template_part
- Variable use in get_template_part
- Is it safe/recommended to use wp_enqueue_script function outside the functions.php file?
- Get the php template file from other theme folder
- Loading page content into a variable in template
- How can I see what template parts are being called for rendering the viewable page?
- Get template part vs locate template function
- passing argument to get_template_part() or a better way to code
- get_template_part execute with ajax
- Single Page WordPress Theme – Using page templates
- Get template part based on custom taxonomy term
- _wp_page_template to dynamically use template
- Templates & CSS – Proper Programming Practice?
- Which custom query am I in and how can I access its properties & methods?
- WP_Query on custom post type not displaying, multiple loops & get_template_part
- TwentyTen: Overloading template.php files vs. get_template_part
- Accessing $post variable from template part
- get_template_part not working with ajax
- Passing variables to template parts
- Template tags vs get_template_part() vs functions.php
- Correct way to use get_template_part() and get_post_format() with custom post types?
- Template part vs Sidebar (differences)
- How to move style from template file to section?
- How to pass variables with get_template_part?
- get_template_part in admin
- How to localize inline script called with ajax
- Finding Page Template and Displaying Content
- Unable to include a template
- ACF Relationship + WP Template Parts
- How to make get_theme_mod work with AJAX in the customizer preview
- Does get_template_part pull data once in a loop?
- Some doubts about how to show posts in a custom theme?
- Checking whether template part is loaded in a page
- get_template_part() – post-meta not working?
- Post Format single-loop.php using get_template_part
- Filter get_template_part() $args array
- Template part inside shortcode, unexpected reult
- Is there any way to get all the name or slug of template parts used in a page?
- get_template_part for each level of taxonomy term
- How to get_template_part using AJAX?
- Where is the template for the ‘standard’ format of a post in the theme twentythirteen?
- Valid HTML in Template Part
- Unexpected results with conditionals inside template part
- get_template_part and template file names
- What is the best way to organize template parts?
- Get template part using a custom taxonomy term
- how could I load a different template part by page
- Get_template_part inside a folder
- Problems with loop
- Conditional get template part
- Don’t see add_filter result in the site front page
- add active class based on permalink and url
- Showing the WordPress standard text area on a Woocommerce Single Product Page?
- Overriding of the template for the Attachment “thumbnails” in the Media Grid isn’t working
- Styles and scripts inside template part
- How to show “teaser” posts on blog / archive pages, otherwise full posts
- Modify foreach loop for social sharing links?
- get_template_part based upon post’s category
- Modal working only on home page