Everyone has got his/her own style of writing code. Personally, I believe that using different opening and closing PHP tags makes the code easy to read and understand. Theme files carry both PHP as well as HTML code, so keeping the code clean in order to make it easy to read becomes important. Adding HTML in between also becomes easy if you separate your PHP statements.
That apart, I don’t think there is any performance compromise if you use PHP open and close tags (please correct me if I’m wrong here). So, why not?! 🙂
Related Posts:
- Sizing screenshot.png without losing aspect ratio
- How to add CSS class to custom logo?
- Should `get_template_directory_uri()` be escaped?
- How To Add New Option Types To Option Tree?
- Page template in two level deep folder
- Automatic Updates For Private And Commercial Themes?
- Child Theme not loading parent CSS
- What can I hook into after_setup_theme?
- Where do I find the functions triggered within a hook?
- add_image_size is scaling, even though crop is set to true
- Use of undefined constant FS_CHMOD_DIR – assumed ‘FS_CHMOD_DIR’
- Registering Sidebars and Sidebar Widgets. Sidebar Widgets Not Displaying
- How do I get a parent theme modification from a child theme?
- Removing the default sidebar from admin panel
- how to pull wordpress post comments to a external page
- index.php is not loaded for single posts
- Why use while over if in single wordpress posts?
- WordPress website loads but is not displayed until page scrolled
- How to use bloginfo( ‘template_directory’ ) in array
- How to set page template on front using starter content?
- Different Admin Theme – Based on Role?
- Theme Customizer not loading
- Is it a good idea to make whole theme widgetized?
- Single Theme folder for Multiple WordPress
- Override Constants in Child theme
- How i can get widgets areas working in customizer?
- Cutomize Colors utility: How to add more configurable colors to a theme
- Where is definied the theme location for the main menu in a WordPress template?
- How to disable automatic colors in the Twenty Twenty theme?
- I want to get the home root path
- Gutenberg – editor-font-sizes in functions not working
- Cannot figure out how to overwrite files in child theme
- WordPress post arrangement using post_class
- Customize the previous_post_link output
- How to use get_template_part instead of include_once?
- How to remove comment link title attribute?
- Translation Issue with WordPress Theme Check in comment_form function
- wp-cli: For development, how can I activate a theme that is on the local disk but not zipped?
- My Admin bar covers my sticky navbar [closed]
- Using esc_url with a hard coded url
- Broken template went invisible
- Single Page Design, Storing in Theme Options
- How to edit theme functions file to modify pagination?
- Edit footer via customizer
- loading blank white screen of slide
- Child Theme’s style.css not loading in mobile browser
- Migrated WordPress site renders Chinese
- Customizer – loading settings/controls/sections/panels based on a id/page id
- Overrite parent functions using child functions
- Does code in function.php differ from theme to theme
- How can I change the theme of different posts using a plugin?
- Theme not showing up
- Theming Using Bootstrap Glyphicons and WordPress Dashicons
- Change image size depending on page
- Starting point for custom Themes [closed]
- Theme Development -> Specific Homepage
- Why still output /wp-content/themes/twentynineteen?
- get_header action not working
- Unable to change the priority with ‘remove_action’ and ‘add_action’ in child theme
- Remove h1 from 2015 theme
- WordPress pulling in random page themes
- Some doubts about WordPress handle the horizontal main menu visualization
- Can’t change theme name
- How to remove permalinks links presents in each page of my site?
- Is there a way to serve different resolution images to different devices?
- How to make a function occurs for one time?
- How do I restructure the comment HTML layout?
- Trying to link to a php template file but its blank
- Theme: dropdown hover menu not showing up in IE/Edge
- Problem with pagination link (error 404)
- how to ensure responsiveness in wp themes? [closed]
- How to test another theme in a live WordPress website instead of live preview?
- home is not working in wordpreess
- Is there a way to create sections under “Colors” panel in the Theme Customizer?
- Local theme changes upload on server but theme changes not showing
- WordPress Custom font not found
- WordPress uploads do not show up and I see the white screen of death in some cases
- Can’t upload images on new theme
- New created Theme leads to malfunctioning Xampp Apache –> functions.php is cause
- WordPress Blog Page displaying nothing
- Primary Menu Showing All Pages With No Sub-Nav
- Magnific Popup – Add Caption to Images
- Theme Development : License help
- Why the slideshow is not shown in my theme?
- Theme customizer live preview JS- Trying to bind to an html image url without luck
- Displaying Tags for the Page I’m On?
- How to make navigation a list without a plugin? [duplicate]
- Showcase your wordpress themes [closed]
- What is The Best Way to Make Parallax header effect for wordpress theme ?? pure CSS or using JavaScript? [closed]
- Purchased Theme to Custom Made Theme? [closed]
- How to make website with many template that active [closed]
- Image Size wrong during upload
- How do I add new layout width options in WordPress editor?
- How to show associated fields if checkbox is checked in customize widget screen using wp_customize?
- Dynamic nav menu with icons [closed]
- TItle In Latest Post is not using H1 Tag [closed]
- Is via.placeholder.com a good site to auto-generate placeholder images?
- Should we escape the values of constants?
- How to Add Dynamic Sliders to WordPress Customizer with JavaScript
- Why is wp_nav_menu() not removing the container around the nav ?