PHPのコードではなくてテンプレートタグとして記述#1
Open
miya0001 wants to merge 2 commits intonaokomc:masterfrom
Open
Conversation
4213a53 to
3f99de6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
細かいんですがテンプレートタグとPHPのコードを区別してあげるといいかなーといつも思うんです。
<?php ... ?>をコピペしてください。コピペではできない機能を実装したいならPHPの勉強をするべきです。みたいな感じで説明するとプログラマーとそうでない人の境界線が少しは分かりやすいかなーと。Codexにもテンプレートタグという表現が使われているので、タグらしく1行でコピペができるような感じで覚えてもらうとHTML+JS+CSSしかできない初心者も事故りにくいんじゃないかと思います。
https://wpdocs.osdn.jp/%E3%83%86%E3%83%B3%E3%83%97%E3%83%AC%E3%83%BC%E3%83%88%E3%82%BF%E3%82%B0%E5%85%A5%E9%96%80
こう記述することで初心者がググりやすいというのもあります。
https://www.google.co.jp/search?q=%3C%3Fphp+while+(+have_posts()+)+%3A+the_post()%3B+%3F%3E&oq=%3C%3Fphp+while+(+have_posts()+)+%3A+the_post()%3B+%3F%3E&aqs=chrome..69i57.317j0j9&sourceid=chrome&ie=UTF-8
好みの問題かもですが。笑