A very basic question:
I'm creating a WordPress Page Template.
I have a file: pagetemplatename.php
Obviously the file has .php on the end of the name: Is everything in this file php code? Or can CSS and other code go in this file?
A very basic question:
I'm creating a WordPress Page Template.
I have a file: pagetemplatename.php
Obviously the file has .php on the end of the name: Is everything in this file php code? Or can CSS and other code go in this file?
Your file could look like this:
<html>
<body>
<?php some php code ?>
<h1>test</h1>
<?php some more php?>
</body>
</html>
The entire file could be php, or you could indicate where you want php to be executed using the <?php ... />
tags.
Check out the intro here.
Scripting Language always needs markup language to display. so whatever you can done in HTML, you can do the same on .php page
you can write
CSS,JS and HTML
You can both separate and combine your PHP / HTML / CSS / Javascript / XML / etc. pages.
You can put your PHP code directly between your HTML tags, or use some sort of templating system to keep your back end code and design separate.