I’m going to echo all of the above comments & say it’s not a good practice to get into. You might want to borrow a convention from the PHPTemplate library used in Drupal and call your files something.tpl.php
. That way it’s still a .php
file, but you have an extra extension showing it’s a template.
Related Posts:
- Custom plugin: Trying to show saved data on frontend
- Is there a browser plugin or method to find which php template an item is coming from?
- Does the debug.log do log rotation?
- ob_get_clean returns empty string, ob_get_flush outputs string
- Edit postmeta when user changes user role?
- Pagenavi pagination via wp-query in functions.php showing same content for each page
- WPDB: how to get the value of a field in a custom database table
- Looping through WP_Post Object
- Translating add to cart woocommerce button [closed]
- Theme currently showing thumbnails, how to show full size?
- How can I use wp_insert_comment to write a comment when a post is edited?
- How can I use a modal window to display the current post in loops featured image?
- How to query for pages/post depending on slug?
- How do you add customer capability after Woocommerce purchase?
- Change sign up fee in cart for subscription products WooCommerce
- How to make a search button that will search my website?
- Only echo item in foreach with highest value [closed]
- How to put a variable in a instance in the widget
- How do I list the child of a child page [duplicate]
- how to remove metadata from the posts of my blog?
- How can I create a list of page titles from custom meta values?
- get_the_tags() not iterating through for/while loop, but will with foreach
- get a simple array of all of the term names that exist in all taxonomies
- Is there an error in my code?
- Show categories then when clicked on a category list all sub category and when clicked show all posts in that sub category
- Cron job update csv, need help solving :-)
- How to disable server signature on wordpress? [closed]
- Extend plugin Class through functions.php
- wp attempt focus, disabling without touching core
- How can I edit the content in index.php? [duplicate]
- Website needs to be opened for wp_mail to work
- How to know where this function definition is declared?
- Is this spyware on my site or a real Java update?
- Conditional Javascript based on WP Version
- Is it best to avoid using $wpdb for security issues?
- Underscore – Self hosted fonts
- Is it possible to return content, and then also continue to do other things?
- How can I automatically resize up images to fit into all of my registered image sizes
- Does WordPress create a new Linux user when creating a new WordPress blog?
- Correct PHP to output a single result of a Function with SQL Query
- How to remove the h6 tag for the entry-category Class
- Can’t add script immediately after the opening tag on login page?
- page-slug.php not working but only for specific slug
- Redirect to a page for only logged in user
- Broken kses.php function “wp_kses_named_entities” crashes WordPress
- Understanding webhooks
- if custom field doesn’t exist, use post thumbnail instead, as image background
- How to turn each phone number within the $content to a telephone link?
- Processing ajax call to php to insert into mysql database
- Storing content into a custom taxonomy
- WordPress Search
- WordPress pagination not working in search result page
- How to add 3 weeks to the_time() function
- wp nav menu: show submenu below li item
- How to call custom function outside from the admin page?
- Show different size featured images (the_post_thumbnail) for 1st, 2nd and 3rd posts?
- Pagination stays on same page for post category
- I get “Cannot modify header information – headers already sent” when I change my theme
- Fetching review value using wpdb class
- WordPress Custom Query: Combining Two Functions
- Reject all malicious URL requests functions.php
- Using some Loop or repeatable fucntion in AJAX and PHP to reduce repeatability
- How do I call a value from the datase using ajax
- Woocommerce disable order item link (backend) [closed]
- Create an array with all the links of the years’ archive (of a custom post type)
- Post form – AJAX won’t upload featured image – Plugin development
- Adding ELSE argument to AJAX Live Search for “No results found”
- get_results() doesn’t fetch the result
- How can i find wrong word in search box and replace with correct word
- admin panel – How to remove “delete” button from category editing page
- Like and Dislike Buttons on Post with Counter – Only allow one click per post per user session
- Comparison operator != not working in field [closed]
- How to override WooCommerce Order Item Meta with data from Cart?
- get_category_parents to array
- Meta query not showing result properly
- How does WordPress rewrite URLS using its PHP scripts
- WordPress add_rewrite_rule
- Help on Wp_query to print an term
- Inserting other fields to existing registration form in a WordPress theme
- Splitting table data to pages with numbers
- How do I generate formatted permalinks as specified in backend options?
- Upload images from one server to an other in wordpress
- List all blogs apart from the current blog and main blog in WordPress Multisite
- Custom YouTube Plugin loading different PHP library on live site and localhost
- Issue in url update when using wordpress update query
- Widget edit and add in any page
- How to use Amazon Elastic Transcoder from WordPress using AWS SDK for PHP?
- add_rewrite_rule questions
- Active class not working on custom menu link using add_menu_page
- Show items by user_role
- Break a WordPress function to run in patches and re-continue
- Post content not showing some content
- link to page_for_posts
- PHP-Code inside Href-Tag
- How to handle parent and child pages?
- WooCommerce – Show ‘Sales’ badge on variable products where only some variations have sales price [closed]
- How to create a container in php then customise it in CSS
- How to initialise WP_Query on the basis of a specific meta_value and continue iterating rest?
- Custom Post Type doesn’t have template content when creating programmatically in PHP but does when created in WP Admin
- How can add alt tag in following code. Image are showing dynamic in wordpress