質問編集履歴
1
変更点を修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -2,9 +2,10 @@
|
|
2
2
|
|
3
3
|
WordpressでHPを作成しています。
|
4
4
|
トップページが固定ページですが、PHPで投稿ページ一覧を表示させることはできました。
|
5
|
-
その投稿ページ一覧の中で、
|
5
|
+
その投稿ページ一覧の中で、段組みを組みたいと思っています。
|
6
|
-

|
7
6
|
|
7
|
+
スマホで見ると、アイキャッチ、タイトル、記事抜粋、日付と並べることができました。
|
8
|
+
PCで見た場合、左側にアイキャッチ、アイキャッチの右側にタイトル、記事抜粋、日付と並べたいところが、アイキャッチの下に並んでしまいます。
|
8
9
|
|
9
10
|
### 該当のソースコード
|
10
11
|
|
@@ -31,7 +32,29 @@
|
|
31
32
|
<?php endwhile; endif; ?><?php wp_reset_query(); ?>
|
32
33
|
```
|
33
34
|
|
35
|
+
### 変更を加えたソースコード
|
34
36
|
|
37
|
+
```PHP
|
38
|
+
<?php query_posts('posts_per_page=5'); ?>
|
39
|
+
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
|
40
|
+
<a href="<?php the_permalink(); ?>" style="text-decoration:none; font-size: 12pt; color: #000000; line-height:24pt;">
|
41
|
+
<p style="background-color:#FFFFFF; margin : 0pt ;">
|
42
|
+
<div class="post-thumbnail"><?php the_post_thumbnail(array(100, 100) ); ?></div>
|
43
|
+
<div class="wrap content">
|
44
|
+
<h2 class="post-title" itemprop="headline"><?php the_title();?></h2>
|
45
|
+
<p class="excerpt"><?php echo wp_trim_words( get_the_content(), 55, '...' ); ?></p>
|
46
|
+
<p class="date"><?php the_time('Y年m月d日'); ?></p>
|
47
|
+
</div>
|
48
|
+
|
49
|
+
|
50
|
+
|
51
|
+
<hr class="bar3">
|
52
|
+
|
53
|
+
</p>
|
54
|
+
</a>
|
55
|
+
<?php endwhile; endif; ?><?php wp_reset_query();
|
56
|
+
```
|
57
|
+
|
35
58
|
### 補足情報(FW/ツールのバージョンなど)
|
36
59
|
Wordpress4.9.8
|
37
60
|
テーマ [レスポンシブWordPressテーマ No.087[美容黒]](http://c-tpl.com/rwp_087.php)
|