I think there is zero performance issue regarding multiple uses of get_template_directory()
(or any of its siblings). The return values of these functions are part of the cache. Multiple calls to these functions do not incur multiple database hits.
Related Posts:
- How to retrieve an image from a post and display it before excerpt of a post? [duplicate]
- Move default page templates to sub directory
- How to add custom meta box when you have a custom page template file
- Create theme for mobile phones and tablets only?
- Best practice to create required pages
- How customizable is a self-hosted WordPress blog compared to a Blogger blog?
- What’s the difference between home.php and index.php?
- Using classes instead of global functions in functions.php
- Change admin bar to default:off
- How to move page templates to custom folder?
- Is it possible to manipulate the list of page templates?
- How to change admin bar color scheme in MP6 / WP 3.8 front end?
- Template for individual post designs
- When to use esc_url, esc_html, esc_attr, and friends?
- How can you develop on a live WordPress installation that is using W3 Total Cache? [closed]
- Add a preview to a WordPress Control Panel
- Add a #hash to the links in my custom menu
- Front End Post Submit Form
- Feature Survey – What would you want in a resume theme?
- Change loop order via form or link (jquery, not URL)
- Returning Variables back into a template
- How to override BuddyPress 3.0 bp-nouveau theme files?
- How to add custom template tag in wordpress theme?
- How should I store global information such as a phone number so that it is editable through the CMS?
- When developing a distributable Theme, does it HAVE to be “inheritable”?
- Upgrading a custom theme through the Dashboard
- Responsive Images – Generating multiple images from Theme Customizer control upload?
- Modify Javascript Configuration Options for Theme Customizer Colour Picker
- Modify the Additional CSS section (adding a disclaimer)
- Version control for both Vagrant config and themes being developed [closed]
- New template, where to place CSS?
- WordPress Theme Development: How to redirect templates the right way?
- Best way to start becoming a wordpress developer
- which is the best way to customize nav-menu-template.php?
- Where should I update_options in a theme?
- WP 3.1 upgrade breaks AutoFocus+ theme
- create-guten-block in wordpress theme?
- Displaying recent post excerpts on static front page
- Customizer: Unique identifier that distinguishes which image upload control is uploading an image
- How to make theme elements customizable in wordpress?
- How can I detect hierarchal relationships beyond children (grandchild, great-grandchild, etc)?
- JavaScript stops working on selectively refreshed sections one inside the other
- Customizer: save setting/control content to post/page
- Is it possible to visually group items on the theme customizer?
- Custom Blocks as part of a theme
- Customize how a WordPress theme looks like in the Theme Selector
- Customizer – loading settings/controls/sections/panels based on a id/page id
- Where to place template files?
- Widget Option is Missing
- Default Text not showing from customizer
- Replace single_template filter with what for default posts?
- How to have content scroll over background
- Need help with adding templates (archives and sitemap) to WordPress child theme
- WordPress Template Part in iFrame
- Template for landing pages
- How to seperate static phrases from template files in custom theme?
- Is there a WordPress boolean for “theme_customizer_active()”?
- Post and page content not displaying in search results
- Why still output /wp-content/themes/twentynineteen?
- How to clean up the theme for production?
- add shortcode support in customizer
- Templates dropdown not appearing using _s theme (underscores)
- Woocommerce Product attribute not imported with wordpress Importer [closed]
- add jquery file if a certain page is included
- Update Specific Key Value in Complex `wp_options` object
- pass html code to worpdress
- Can’t change theme name
- Remove/Hide a Widget on a Custom Template
- How to use multiple check-box values to work in a function and insert values in database
- How to Modify WP_Includes/blocks/latest_posts.php
- WordPress hierarchy clarification, does post_type_archive take precedence over taxonomy-term archive?
- How to implement pagination in category.php template
- Using wp_add_inline_style Inside a Template File
- how to edit woocommerce checkout page
- Should I use template files or just use conditional tags in index.php?
- WordPress Twenty-Fourteen: How to Remove Home Page Header Image from Other Pages
- WordPress menu walker – Get parent item text inside end_lvl function
- How to dowload and edit content of a website
- HTML TO WP Theme : Submenu goes down wp_nav_menu
- Display content on Single page
- Any way to permanently translate themes?
- Create a variable with string, array or multiple values
- Best strategy for providing theme options using customizer
- Customizer API way function is_customize_preview() works only in main page?
- How can I fix the even/odd child classes comments so that the comments are unaffected by the top-level even/odd?
- Support Multiple featured images
- How Does One Create a Global Variable Repository
- What hook to use for loading a custom class extension during Theme initialization?
- Problem with multiple menus in theme
- Enable WP to accept standard jQuery code embeding between the tags [duplicate]
- trying to figure out how to use more that one image upload in the same section in theme customizer
- How to convert that page to a wordpress template? [closed]
- Not Found when using activity stream as front page with BuddyPress
- How do I change the tagline input to textarea?
- What is the advantage of using home.php over index.php for the front page
- WordPress theme Modifications not showing up on live server
- How can i move my product name & price from below thumbnail to be the rollover content in Avada & Woocommerce?
- How to set up a development/staging site to make major changes to the theme then update on the live site?
- What is the point of using the front-page.php template? [closed]
- Meaning of “if ( is_home() && ! is_front_page() )” snippet?