Last active
September 20, 2018 01:53
-
-
Save mhige/0c69f2ebbd9f3570f1225a5b51f960c2 to your computer and use it in GitHub Desktop.
Wordpressのget_post関数で記事IDを指定して記事情報を取得し、その中からタイトル情報を出力
This file contains 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
<?php | |
// ID9999の記事の"タイトル"を出力 | |
echo get_post( 9999 )->post_title; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment