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

定例WordPress講座 カスタマイズ編

定例WordPress講座 カスタマイズ編

Dda24cce92447593513292ec748c70c4?s=128

Koji Kuno

June 09, 2018
Tweet

Transcript

  1. ఆྫ8PSE1SFTTߨ࠲ ʙΧελϚΠζฤʙ

  2. 8PSE1SFTTͷओͳ࢖͍ํ w 8PSE1SFTTDPNΛར༻ w 8PSE1SFTTΛαʔόʔʹΠϯετʔϧͯ͠ར༻ w ެࣜσΟϨΫτϦͷςʔϚΛར༻ͯ͠ӡӦ w ϓϥάΠϯΛ׆༻ͨ͠ػೳ֦ு w

    ࢠςʔϚΛར༻ͨ͠ΧελϚΠζ w ΦϦδφϧςʔϚΛ࡞ͬͯӡӦ
  3. ϝϦοτ͸ʁ w ਌ςʔϚΛ௚઀มߋ͢ΔͱΞοϓσʔτͰ্ॻ͖͞ΕΔ
 ˠࢠςʔϚͰͷมߋ͸࣮֬ʹอ࣋͞ΕΔ w ։ൃ࣌ؒͷ୹ॖ
 ˠ਌ςʔϚͷେ෦෼ΛܧঝͰ͖Δ w 8PSE1SFTTͷ͜ͱΛखܰʹΑ͘஌ΕΔ
 ˠςʔϚ։ൃͷ஌ࣝΛशಘ͢Δ͖͔͚ͬʹ

  4. Կ͕Ͱ͖Δʁ w $44ʹΑΔ૷০ͷ্ॻ͖ w ςϯϓϨʔτʢTJOHMFQIQͳͲʣͷ্ॻ͖ w 1)1ʹΑΔػೳ௥Ճ

  5. ͦͷ։ൃ͸ຊ౰ʹඞཁʁ ࣮ݱํ๏͸ਖ਼͍͠ʁ ϝϯςφϯε·Ͱߟ͑ͯΔʁ ༨ஊ

  6. $44Ͱ্ॻ͖૷০ w ن໛͸֬ೝࡁΈʁ
 ˠࢠςʔϚΛ࡞Δ͚ͩͰ΋޻਺͔͔ΔΑʁखؒͩΑʁ w ΧελϜ$44ͰͳΜͱ͔ͳΔن໛Ͱ͸ʁ
 ˠࢠςʔϚΛ࡞Δ͚ͩͰ΋޻਺͔͔ΔΑʁखؒͩΑʁ

  7. ςϯϓϨʔτ ͲΕ͚ͩॻ͖׵͑·͔͢ʁ w ςϯϓϨʔτΛͲΕ͘Β͍ॻ͖׵͑·͔͢ʁ w ΦϦδφϧͰ࡞ͬͨํ͕ྑ͍ϨϕϧͰ͍ͬͯ͡·ͤΜ͔ʁ w ਌ςʔϚͷΞοϓσʔτ͸ߟྀͯ͠ॻ͖׵͑ͯ·͔͢ʁ

  8. ௚઀࣮૷ʁϓϥάΠϯར༻ʁ w ͦΕ͸ςʔϚʹ௚઀ػೳΛ௥Ճ͢Δ΂͖ʁ w ςʔϚ͸ࠓޙมߋ͞ΕΔ͜ͱ͸ͳ͍ʁ w ϓϥάΠϯͱͯ͠ύοέʔδʹͯ͠ΈͨΒʁ w ϓϥάΠϯΛར༻͢Δ͜ͱͰ࣮ݱͰ͖ͳ͍ʁ w

    ӡ༻։࢝ޙͷϝϯςφϯεͷ͜ͱߟ͑ͯΔʁ
  9. 8PSE1SFTTͷߏ੒ཁૉ 8PSE1SFTTίΞ ઃఆϑΝΠϧʢXQDPOpHQIQʣ σʔλϕʔε Ξοϓϩʔυσʔλʢը૾౳ʣ ϓϥάΠϯ ςʔϚ

  10. ςʔϚϓϥάΠϯ ͦΕͧΕͷ໾ׂ w ʮςʔϚʯ͸ݟͨ໨෦෼ w ʮϓϥάΠϯʯ͸ػೳ෦෼ w ͦΕͧΕͷ໾ׂΛ৵৯࢝͠ΊΔͱɾɾɾ

  11. Α͘೩͑ΔҊLʜ

  12. ༨ஊ͓ΘΓ

  13. ࢠςʔϚͷ࡞Γํ

  14. ࢠςʔϚͰͷΧελϚΠζͰ͸ αʔόʔ΁͸ΞΫηεͰ͖ΔΑ͏ʹ͓͖ͯ͠·͠ΐ͏ɻ

  15. खॱ ਌ςʔϚͷσΟϨΫτϦ໊Λ֬ೝ ࢠςʔϚͷσΟϨΫτϦΛ࡞੒ ඞཁͳϑΝΠϧΛ࡞੒ TUZMFDTTͷελΠϧγʔτϔομͰ਌ςʔϚΛࢦఆ GVODUJPOTQIQϑΝΠϧͷ࡞੒

  16. ਌ςʔϚͷσΟϨΫτϦ໊ Λ֬ೝ

  17. twentyfifteen themes wp-content twentyseventeen twentysixteen

  18. ࢠςʔϚͷσΟϨΫτϦΛ ࡞੒

  19. twentyfifteen themes wp-content twentyseventeen twentyseventeen-child twentysixteen

  20. ͜ͷ࣌఺Ͱ؅ཧը໘Ͱ͸ʜ

  21. ඞཁͳϑΝΠϧΛ࡞੒

  22. ࠷௿ݶඞཁͳϑΝΠϧ twentyfifteen-child style.css functions.php

  23. TUZMFDTT 参照:https://wpdocs.osdn.jp/%E5%AD%90%E3%83%86%E3%83%BC%E3%83%9E   5IFNF/BNF5XFOUZ4FWFOUFFO$IJME 5IFNF63*IUUQFYBNQMFDPNUXFOUZTFWFOUFFODIJME %FTDSJQUJPO5XFOUZ4FWFOUFFO$IJME5IFNF "VUIPS,PKJ,VOP "VUIPS63*IUUQPMFJOEFTJHODPN 5FNQMBUFUXFOUZTFWFOUFFO

    7FSTJPO -JDFOTF(/6(FOFSBM1VCMJD-JDFOTFWPSMBUFS -JDFOTF63*IUUQXXXHOVPSHMJDFOTFTHQMIUNM 5BHTMJHIU EBSL UXPDPMVNOT SJHIUTJEFCBS SFTQPOTJWFMBZPVU BDDFTTJCJMJUZSFBEZ 5FYU%PNBJOUXFOUZTFWFOUFFODIJME  ਌ςʔϚͷσΟϨΫτϦ໊Λ͜͜ʹهड़͢Δ https://gist.github.com/Olein-jp/09191603c84f7cb7128a288c1d64c626
  24. ͜ͷ࣌఺Ͱ؅ཧը໘Ͱ͸ʜ

  25. None
  26. ࣮ࡍʹ΢ΣϒαΠτ΁ ΞΫηεͯ͠ΈΔͱʜ

  27. TwentySeventeen TwentySeventeen Child

  28. GVODUJPOTQIQ add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' ); function theme_enqueue_styles() { wp_enqueue_style( 'parent-style',

    get_template_directory_uri() . '/style.css' ); } https://gist.github.com/Olein-jp/37bf98e4dc4f8b2260967e15b106e462
  29. σϞ w $44Ͱͷ૷০ͷมߋํ๏ w ςϯϓϨʔτͷ্ॻ͖ํ๏

  30. ·ͱΊ w ։࢝ஈ֊ͰͷΧελϚΠζਂ౓Λ֬ೝ͢Δ
 ˠࢠςʔϚͰߦ͏΂͖͔൱͔ͷ൑அ w ϝϯςφϯε·ͰΛݟӽͨ͠։ൃํ๏Λબ୒
 ˠϓϥάΠϯͱςʔϚͷςϦτϦʔΛ໌֬ʹ w ·ͣ͸΍ͬͯΈΑ͏
 ˠςʔϚͷߏ଄΍ςϦτϦʔΛ෼͚Δඞཁੑ͕ମײͰ͖

    Δ͔΋
  31. ͝੩ௌ ͋Γ͕ͱ͏͍͟͝·ͨ͠