Upgrade to Pro — share decks privately, control downloads, hide ads and more …

WordPress の機能をちゃんと知る

WordPress の機能をちゃんと知る

WordBench Nagano vol. 17 での登壇資料です

Toro_Unit (Hiroshi Urabe)

March 31, 2018
Tweet

More Decks by Toro_Unit (Hiroshi Urabe)

Other Decks in Technology

Transcript

  1. Toro_Unit ઎෦ ߛ (͏Β΂ ͻΖ͠) HAMWORKS • Frontend Engineer •

    WordPress Plugin and Theme Developer • Custom Post Type Permalinks • Vanilla • more... Github: @torounit Twitter: @Toro_Unit 3
  2. Plugins and Themes • Custom Post Type Permalinks • Simple

    Post Type Permalinks • Powerful Posts Per Page (PPPP) • Responsive Slide • Vanilla • and more... 5
  3. Contribution • WordBench ௕໺ ϞσϨʔλʔ • WordCamp Kyoto 2017 ࣮ߦҕһ

    • WordCamp Tokyo 2017 Speaker • WordBench.org • VCCW Team • etc... 6
  4. Case.1 ίϝϯτϑΟʔυΛফ͍ͨ͠ɻ <link rel="alternate" type="application/rss+xml" title="Toro_Unit &raquo; ϑΟʔυ" href="https://torounit.com/feed/" />

    <link rel="alternate" type="application/rss+xml" title="Toro_Unit &raquo; ίϝϯτϑΟʔυ" href="https://torounit.com/comments/feed/" /> ίϝϯτ࢖Θͳ͍͔Βফ͍ͨ͠ɻ 10
  5. 12

  6. <?php query_posts( array( 'post_type' => 'post', 'paged' => get_query_var('paged') )

    );?> <?php if( have_posts(): while( have_posts()) : the_post();?> <?php endwhile; endif;?> <?php wp_reset_postdata();?> <?php wp_reset_query();?> ͱ͔ <?php $blog = new WP_Query( array( 'post_type' => 'post', 'paged' => get_query_var('paged') ) );?> <?php if($blog->have_posts(): while($blog->have_posts() ): $blog->the_post();?> <?php endwhile; endif;?> <?php wp_reset_postdata();?> Ͱ࣮૷ग़དྷΔ͔΋͠Ε·ͤΜ͕ɻɻɻ 20
  7. දࣔઃఆͰઃఆͰ͖Δͧɻ ϗʔϜϖʔδʹ͸ɺfront-page.php → page.php → index.php ͷςϯϓϨʔτ͕ద༻͞ΕΔɻ ౤ߘϖʔδʹ͸ɺhome.php → index.php

    ͷॱͰςϯϓϨʔτ͕ద༻͞ΕΔɻ σϑΥϧτͷ ʮ࠷৽ͷ౤ߘʯͷ৔߹ɺfront-page.php → home.php → index.php ͷॱɻ 21
  8. • ωοτͷ৘ใ͸ۄੴࠞަɻ҆қʹඈͼ͔ͭͣɺଞͷϞϊ΋ݟΔɻ • ·ͣ͸ɺ৴པͰ͖ΔϦιʔεΛௐ΂Δɻ • ެࣜͷυΩϡϝϯςʔγϣϯ • Codex • σϑΥϧτςʔϚ

    • WordPress.org ܝࡌςʔϚ • ༗໊ͳϓϥάΠϯ/ςʔϚ࡞ऀͷίʔυɻ • forum Ͱͷղ౴ɻ/ ࣭໰ͯ͠ΈΔɻ 26