先日WordCamp Tokyo 2015お疲れ会&忘年会を行なった時に、みんなでWordPressカルタをやりました。
コワーキングスペース茅場町Co-Edoにて
WordCamp当日は、スタッフみんな忙しいので、カルタで遊ぶ時間なんてないのですが、こういう時の余興としてはいいですね。さすがに、みんなWordPressの猛者ばかり。札を読んでいる途中で、バンバン札が取られて行きます(´⊙ω⊙`)。
でも、中には似たような名前や機能のプラグインやテンプレートタグもあるので、お手つきも続出!
今年の委員長清野くんと、来年の委員長直子さんによる、JetPackの奪い合いもあり、大変盛り上がりました\(۶•̀ᴗ•́)۶/
というわけで今日は、先日のプラグイン編に続いて、[WordPressカルタテンプレートタグ編]をお送りします。
ヘッダー、またはフッターにJavaScriptファイルへのリンク要素出力を登録する
Adds a JavaScript file to the queue for inclusion on the current page.
wp_enqueue_script
headタグ内に必須となるテンプレートタグ、CSSやJavaScriptのlink要素などを出力する
Output content for the HEAD tag, including CSS and JavaScript.
wp_head
記事の作成者名を表示する
Display the name of the article’s author.
the_author
サイトアドレスを取得する
Return the full address to the site’s home page.
home_url
WordPressループの内部カウンタをインクリメントし、ループ内で表示する記事情報のセットアップを行う
Iterates to the next post in the loop, and sets it up for use.
the_post
表示する記事の有無を判定する
This function returns true if the current WordPress query has any results to loop over.
have_posts
クロスサイトスクリプティングを防止するために、表示されるテキストに対してエスケープ処理を行う
Escapes text to ensure no HTML is inserted and prevent XSS.
esc_html
管理画面の外観 > メニューで作成された、ナビゲーションメニューを表示する
Displays a navigation menu. Menus can be created in the Appearance → Menus panel.
wp_nav_menu
現在の投稿で、投稿編集画面で設定されたアイキャッチ画像を表示する。ループ内で使う
Display the Featured Image (previously called Post Thumbnails) for the current post, as set in that post’s edit screen.
the_post_thumbnail
投稿の日時を表示する
Displays the time the current post was published.
the_time
投稿の抜粋を表示する
Displays the excerpt of the current post.
the_excerpt
リンク付きのカテゴリーリストを表示する
Displays a list of categories as links.
wp_list_categories
現在の記事が属するカテゴリーへのリンクを表示する
Displays a link to the category or categories the current post belongs to.
the_category
テンプレートパーツ (ヘッダー、サイドバー、フッター以外) をテンプレートに読み込む
Load a template part (other than header, sidebar, footer) into a template.
get_template_part
ループの中で処理されている投稿の パーマリンクのURLを表示する
Displays the permalink URL for the current post.
the_permalink
全部知っていましたか?
テンプレートタグの名前は知っていても、改めて日本語で用途を説明されると、ん?ってなったりしますよね。
the_postなんて、読み札の用途を読まれても、ピンと来なかったりする人も多かったです。
日本各地で開催されているWordPressの勉強会「WordBench」などで、懇親会をやることも多いと思います。
そんなとき、WordPressカルタを余興のひとつとして活用してもらえると、嬉しいです!!