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:
- The the_post_thumbnail without srcset?
- after_setup_theme always runs
- WordPress API Menu/Submenu Order
- WP 3.4 – what action/hook is called when theme customisation is saved?
- What WP folder can I use to write files to?
- Why I can’t add a CSS style in this WordPress theme?
- Is it good to rename theme folder downloaded from WordPress.org?
- Editing the custom background CSS
- What, specifically, should be included in theme_name_setup()?
- How to get gallery images?
- Is the theme customizer slowing down my site?
- How can I get wp_head() as a string instead of echoing it?
- Display a different theme for not logged-in users
- What does “Do not deregister the jquery script in the administration area” mean?
- What is the best book to learn how to make themes for wordpress?
- Symlink a directory to wp-content/themes
- What are WooCommerce starter themes? [closed]
- How to disable the gradient and font size internal CSS added by WordPress when using theme.json
- Is there an error in get_the_tag_list()?
- Example of a theme organization without all the default wp files in root
- new theme permissions don’t allow me to edit
- Disable the Custom Internal CSS added by theme.json for Certain Pages
- Unwanted blank lines before tag
- How do I display the “Archives” widget layout (sidebar) in WordPress by ‘year’ then by ‘months’?
- How do you protect a premium theme from being copied?
- What page should I use for a contact form?
- How can a Theme Contain no Header File or Footer File?
- Custom Nav Walker Displaying Values in Sub Menu
- How to configure wordpress to work with Vuejs with SSR and without hashbang
- How can one update a theme on a live site without interruption?
- Sub folder CSS that’s read by Admin panel
- Some translations do not work in my template class
- Some doubts about how to show posts in a custom theme?
- Dequeue a style file which is making website load slow!
- How to remove a file included in parent theme with locate_template() via child theme?
- Can’t delete theme
- How to add a second stylesheet to the editor
- qTranslate with my own theme and settings
- Single Page theme [closed]
- Can I have two different theme for two different language?
- WP_Comment_Query – Get comments and answers separately
- excerpt() shows different result between remote and localhost(development environment)
- Prefix best practice, should we use framework name or theme name?
- Theme Javascript.php Overwritten Nightly [closed]
- How to add Space between sidebar and footer widget in WordPress theme [closed]
- How can my theme allow users to take advantage of advanced html tags in posts
- Call to undefined function add_menu_page() on theme activation
- how to get the post attachement image in full size?
- Is it acceptable for a WordPress theme to not accept widgets?
- Should all references to a text domain be to my current theme?
- Set a featured image as a replacement to the header image
- Custom theme: How to call archive-post.php for viewing blog posts
- Theme Customizer not displaying saved values in wp_head (CSS)
- Simple child theme modification but links are broken
- Making a WordPress theme based on twentyten
- Thesis -style Navigation
- How can I wrap all blog posts image with
- theme style is applied on the dhasboard rather than the website
- Alignment Problem [closed]
- What $handle does WordPress use for a theme’s implicit style.css?
- Create theme for mobile phones and tablets only?
- Unwanted empty line at the beginning of document
- Why is my container argument not working for wp_nav_menu() [closed]
- Never actually adding the action? Or do I have to call the action?
- best practices for updating wordpress theme
- Theme Checker Text Domain
- help needed for suit designing tool
- How to modify theme content in Thematic?
- Not sure how to debug this npm install error. This is a wordpress theme that comes with a built-in gulp/webpack task automation [closed]
- How to update mark-up of a gallery block in a custom theme?
- Host Private Custom Theme
- My wordpress theme name isn’t updating straight away
- Why front-page.php doesn’t show content of file instead shows loop
- Customizer API Multi Sections in single Panel
- WordPress theme options checkbox default checked state
- Copying a modified theme from one wordpress site to another wordpress site [closed]
- How can I change this SVG shape that’s generated?
- Adding a second logo next to the main one in header
- (Parent) theme Is Not Showing In Theme Selection Panel and Therefore Breaks Child Theme
- Are paginated comments required for publishing Themes?
- How can I fix my theme header for my CSS stylesheet?
- How to show some of category in wordpress
- using themename_the_custom_logo() in template-tags?
- Creating a theme just to deploy a single page
- Custom page template not showing on page creation
- Custom theme vs theme customization?
- Weird ‘theme update’ error [duplicate]
- How to migrate the menu from the site on my own theme in WordPress?
- Incorrect search results in search.php – issue triggered by using `define(‘BodyID’, ‘search’); the_post();` in search.php
- Flexslider not working for my custom theme WordPress
- “No Data Received” error in Chrome every time i try to update the theme functions file
- Redirect to custom login page
- How to close open divs in post loop
- Display Today’s date outside the loop?
- Confused on loading page content
- php file child theme directory not overriding parent theme php file [duplicate]
- Turning WordPress Into full-featured website?
- Why am I getting posts back when I shouldnt
- What is the point of using the front-page.php template? [closed]
- Full site editing templates folder vs block-templates