質問編集履歴

2

コード式修正

2022/06/01 05:41

投稿

webserviceNI
webserviceNI

スコア39

test CHANGED
File without changes
test CHANGED
@@ -15,10 +15,10 @@
15
15
 
16
16
  ```ここに言語を入力
17
17
  <?php
18
- $title = get_the_title();
19
- $field_object = post_custom("description");
20
- $description = get_the_excerpt() ';
21
18
  ~
19
+ $description = get_the_excerpt();
20
+ ~
21
+ ?>
22
22
  <head>
23
23
  ~
24
24
  <meta name="description" content="<?php echo $description;?>">

1

文法の修正

2022/06/01 04:43

投稿

webserviceNI
webserviceNI

スコア39

test CHANGED
File without changes
test CHANGED
@@ -1,6 +1,6 @@
1
1
  リファレンスなどを読むと、抜粋文を取得するget_the_excerptタグはループ内で使用する関数ということでした。
2
2
 
3
- 今記事抜粋文をメタタグに設定したいため、single.phpのhead内でget_the_excerptタグを利用して抜粋文を取得しまし。そしてhead内で使用したのですが、きちんと抜粋文が取得できました。
3
+ 今記事抜粋文をメタタグに設定したいため、single.phpのhead内でget_the_excerptタグを利用して抜粋文を取得したところ、きちんと抜粋文が取得できました。
4
4
 
5
5
  ループ内というのは
6
6