home.php の作成

home.php の作成

wordpressでは表示するときに優先順位があり
それに基づきトップページが表示されます

基本的には
font-page > home > index
という順番になります

以前、作成した home.html をここへ
home.php としてコピーすると
リロードしたときに
index.php ではなく home.php が表示されます

これは、この優先順位が適用されるためです

なお、コピーしたときには画像のパスなどが
違っているので、アイコンが表示されません

homep

次回以降、home.php を改造していきます

現在の home.php のソースは以下のようになります

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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>jQuery Mobile</title>
<link rel="stylesheet"
 
</script>
<style>
  img.ic{
    width: 64px;
    height: 64px;
  }
</style>
</head>
<body>
<div data-role="page" data-title="jQuery Mobile">
<div data-role="header">
 <h1>jQuery Mobile</h1>
</div>
<div role="main" class="ui-content">
 
<!-- 1行目 -->
<div class="ui-grid-b">
  <div class="ui-block-a">
 
    <a class="ui-btn ui-corner-all" href="sweet.html"><img src="icon/wa.png" alt="" class="ic"><br>和食</a>
  </div>
  <div class="ui-block-b">
    <a class="ui-btn ui-corner-all" href="sweet.html"><img src="icon/chu.png" alt="" class="ic"><br>中華</a>
  </div>
  <div class="ui-block-c">
    <a class="ui-btn ui-corner-all" href="sweet.html"><img src="icon/yo.png" alt="" class="ic"><br>洋食</a>
  </div>
</div>
 
<!-- 2行目 -->
<div class="ui-grid-a">
  <div class="ui-block-a">
    <a class="ui-btn ui-corner-all" href="sweet.html"><img src="icon/cake.png" alt="" class="ic"><br>スイーツ</a>
  </div>
 
  <div class="ui-block-b">
    <a class="ui-btn ui-corner-all" href="sweet.html"><img src="icon/ramen.png" alt="" class="ic"><br>ラーメン</a>
  </div>
</div>
 
<!-- 3行目 -->
<div class="ui-grid-b">
  <div class="ui-block-a">
    <a class="ui-btn ui-corner-all" href="sweet.html"><img src="icon/camera.png" alt="" class="ic"><br>カメラ</a>
  </div>
  <div class="ui-block-b">
    <a class="ui-btn ui-corner-all" href="sweet.html"><img src="icon/map.png" alt="" class="ic"><br>地図</a>
  </div>
  <div class="ui-block-c">
    <a class="ui-btn ui-corner-all" href="sweet.html"><img src="icon/tweet.png" alt="" class="ic"><br>ツイート</a>
  </div>
</div>
 
</div>
<div data-role="footer">
 フッター
</div>
</div>
</body>
</html>

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です