投稿関連
ページID 取得・表示
[php]<?php $post_id = get_the_ID ( ) ;
echo $post_id; ?>[/php]
リンク取得・表示
[php]
<a href="<?php echo get_permalink( 99 ); ?>">リンクテキスト</a>
[/php]
…
現在のuser_idを取得
$user_id = get_current_user_id();
現在のdisplay_nameを取得
$user = wp_get_current_user(); $display_name = $user->display_name;
graffiti on the web
この投稿へのコメント
コメントはまだありません。