-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex_tutorial.php
More file actions
42 lines (37 loc) · 1.07 KB
/
index_tutorial.php
File metadata and controls
42 lines (37 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
/**
* The main template file
*
* This is the most generic template file in a WordPress theme
* and one of the two required files for a theme (the other being style.css).
* It is used to display a page when nothing more specific matches a query.
* e.g., it puts together the home page when no home.php file exists.
*
* Learn more: {@link https://codex.wordpress.org/Template_Hierarchy}
*
* @package WordPress
* @subpackage WP_University
* @since WP University 1.0
*/
?>
My most amazing theme.
<?php
function htmlpara($name, $color){
echo "<p>Hi, my name is $name and my favorite color is $color, this is an html paragraph echoed from php </p>";
}
htmlpara("Kerry","blue");
htmlpara("Teresa","Azure");
?>
<h1><?php bloginfo('name')?></h1>
<p><?php bloginfo('description')?></p>
<p><?php bloginfo('wpurl')?></p>
<p><?php bloginfo('url')?></p>
<p><?php bloginfo('version')?></p>
<?php
$names = array('Brad', 'John', 'Jane', 'Ringo');
$count = 0; $size = count($names);
while( $count < $size ) {
echo "<li>Hi my name is $names[$count]</li>";
$count++;
}
?>