Will it cause any problems if I use get_template_part() like this?
I can’t really see any answer other than… no. But that’s based on not knowing what you actually mean by “problems”.
If you mean “is this code totally bulletproof no matter what scenario you could possible throw at it” then yes, it may cause problems – I don’t think you can cover for every eventuality.
But if you mean “am I using the WordPress API in the manner intended/am I doing it right”, then yes, you certainly are.
Related Posts:
- has_post_format() vs. get_post_format()
- What difference does it make if I enable support for video post format?
- How do I remove the post format meta box?
- Adding post-formats to Twenty Ten child theme
- Is there a real life use case for post formats except for microbloging?
- Renaming post formats after Gutenberg
- What is the recommended behavior for the post formats?
- Custom Post Formats
- Target all posts that are NOT aside or link post formats
- Filter the first from Quote Post Format
- Displaying all Video Post Formats to Page
- Display Post Format as a String
- Different markup for each post format
- Post Format single-loop.php using get_template_part
- How to recognise on which site the content is being rendered?
- post formats – how to get the relevant content part?
- Post formats for Pages not saving
- How can I remove the first video from a post and feature it?
- previous_post_link/next_post_link disappear when excluding by post_format
- Usage of post_formats
- how to get list of post formats supported by theme?
- Formatting Standard Post Format
- If post-format == ‘gallery’ conditional
- Adding new post format on plugin activation
- post formats – where’s the difference: “aside” vs. “status”?
- How to get the id or url of the image in an image post?
- How do I get standard posts to open up in their own template when using get_template_part()?
- get_template_part() Not Working in Loop
- About post format
- Smart post format loop problems
- “post-format” code snippets list [closed]
- wordpress post formats
- How to display quote format by preg_match function?
- I would like to have a quote page just to show quotes
- How to display list of video post on video section?
- Paste from word not preserving formatting
- How to treat post formats?
- Post formats and template hierarchy
- Change standard post format metabox
- Next Post Link in format
- Mass post format changer?
- Displaying cf post formats with oembed
- Custom formatting
- Passing a variable to get_template_part
- Passing variables through locate_template
- Is There a Difference Between Taxonomies and Categories?
- Is there any way to use get_template_part() with folders?
- How to use get_template_part()?
- How to include a file using get_template_part() in a plugin?
- get_template_part vs action hooks in themes
- Only get_posts of certain post formats
- Using a custom WP_Query with get_template_part loop
- Is it possible to override the result of get_template_part()?
- How do I query by post format in WordPress 3.1
- Should we use get_template_part() in functions files instead of include_once?
- Is there a variable for a template parts name?
- How to make get_template_part always check child theme first?
- Are content.php and content-single.php the same?
- Is it possible to rename a post format?
- How to set a default format for a custom post type?
- Display/query post formats
- How to filter by post-format in admin?
- post formats – how to switch meta boxes when changing format?
- static variable loop not working in WordPress
- How do I add a new custom post format?
- When is get_template_part() preferable to simply using the template.php files?
- Check if partial file is called from within header.php or footer.php
- 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
- Is it possible to remove the “standard” post format?
- Too many get_template_parts?
- Variable use in get_template_part
- get_template_part() does not work if you call it when you are in a subfolder
- Custom Post Formats for Custom Post Types
- Custom post types vs post formats : future-proofing – is one less “future proof” than another?
- Is it safe/recommended to use wp_enqueue_script function outside the functions.php file?
- Does WordPress generate an automatic page for post formats?
- Get the php template file from other theme folder
- Different post format options per custom post type?
- How to query posts of standard post format. For real
- Post Format Archive template name for theme folder?
- Display posts for a single post format
- Loading page content into a variable in template
- Pass a variable to get_template_part
- Post Formats in the context of the Database ‘Save Post’ function
- How can I see what template parts are being called for rendering the viewable page?
- Get template part vs locate template function
- Get post only from ‘standard’ post format
- Changing “Enter title here” based on post format
- How can I add dropdown widget/box to admin post page?
- 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
- How to exclude posts of a certain format from the feed
- Post format selector in Thematic child theme post class
- get_template_part inside get_template_part?
- Get template part based on custom taxonomy term
- _wp_page_template to dynamically use template
- Getting the chosen template when iterating through pages