Why doesn't Wordpress allow my PHP code?
I was using PHP to try and include a small snippet of HTML contained in an external file on my server. This is the line that I coded in:
When I loaded the page, nothing was there. So I decided to open up the error console on Chrome. What I found was that my line of PHP was commented out:
<?php include("path_to_file/file_name.html"); ?>
Since I and the CMS (Wordpress) are the only ones that control the code on my site, I figured it had to be WP that commented it out. Why did it do that? How can I stop it from commenting out my PHP?
<!--<?php include("path_to_file/file_name.html"); ?>-->
I know for a fact that most of the content on WP is generated via PHP, if you look at the obscure backend WP files that are used to build the site so it doesn't make much sense to me.