PHP block changed to comment by WordPress?

Question

I’m trying to print stuff with PHP using a simple echo:

<p>Test <?php echo 'Hello'; ?></p>

But “Hello” is not displayed.
When I inspect the webpage I can see that the PHP block has been commented out:

<p>Test <!--?php echo 'Hello'; ?--></p>

What happened?
Is it a bad practice to use PHP like that? (I’d like to display the date actually)

Thank you for your help.

0
Plouff 4 weeks 2022-11-03T08:28:29-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse