WordPress_テーマのつくりかた.pdf

 WordPress_テーマのつくりかた.pdf

341f9bfd1ef3b1f5f08eddac252f8c5f?s=128

Takashi Kitajima

December 23, 2019
Tweet

Transcript

  1. 8PSE1SFTTςʔϚͷ ͭ͘Γ͔ͨ

  2. ςΩετ ΩλδϚλΧγ  !JOD  ϑϦʔϥϯε ϞϯΩʔϨϯν௕࡚   4OPX.POLFZ

     .881'PSN
  3. 4OPX.POLFZ   ԁ ੫ผ ೥  (1-  ϒϩοΫΤσΟλʔରԠ

     ։ൃऀ޲͚"1*
  4. ͪΐͬͱ͚ͩσϞ

  5. w ·ͱ΋ͳ8PSE1SFTTςʔϚͱ͸ w ϋϯυϒοΫΛಡ΋͏ w ςϯϓϨʔτλάΛ࢖͓͏ w 8PSE1SFTTͷηΦϦʔʹԊ͓͏ w ϒϩοΫΤσΟλʔରԠ

    ΞδΣϯμ
  6. w ͜Ε͔Β8PSE1SFTTςʔϚΛͭ͘Ζ͏ͱͯ͠ ͍Δํ w ձࣾͷ࢓ࣄͰΦϦδφϧͷ8PSE1SFTTςʔϚ Λ৮Γ͸͡Ίͨํ ର৅

  7. ·ͱ΋ͳ8PSE1SFTT
 ςʔϚͱ͸

  8. w 8PSE1SFTTࣗମͷػೳ͕࢖͑Δ w ϓϥάΠϯΛ௥Ճͯ͠΋յΕͳ͍ w Ͳ͜ͰͳʹΛ΍͍ͬͯΔ͔༧૝͕ͭ͘ ·ͱ΋ͳ8PSE1SFTTςʔϚͱ͸

  9. w ϝχϡʔػೳ w ϗʔϜϖʔδઃఆ w ΤσΟλʔ w ӈدͤࠨدͤதԝἧ͑ɺશ෯෯޿ w FUD

    8PSE1SFTTࣗମͷػೳ͕࢖͑Δʁ
  10. w ϓϥάΠϯͷ+4$44͕ಡΈࠐ·Εͳ͍ w K2VFSZΛࠩ͠ସ͍͑ͯΔͨΊόʔδϣϯ͕ׯ ব͠Τϥʔ w ಈ࡞΍දࣔΛมߋ͢ΔܥϓϥάΠϯͰɺΤϥʔ Λى͍ͯ͜͠ͳ͍ͷʹͳ͔ͥը໘্ʹ൓ө͞Ε ͳ͍ ϓϥάΠϯΛ௥Ճͯ͠΋յΕͳ͍ʁ

  11. w ਺ઍߦɺ਺ສߦͷGVODUJPOTQIQ w ໋໊نଇ͕ҙຯෆ໌ʢ$441)1ʣ Ͳ͜ͰͳʹΛ΍͍ͬͯΔ͔૝૾͕ͭ͘ʁ

  12. w ద੾ʹςϯϓϨʔτλά͕࢖ΘΕ͍ͯΔ w 8PSE1SFTTͷηΦϦʔʹԊ͍ͬͯΔ w ϑΝΠϧߏ଄໋໊نଇ͕੔ཧ͞Ε͓ͯΓ༧૝ Ͱ͖Δ ·ͱ΋ͳ8PSE1SFTTςʔϚͱ͸

  13. ϋϯυϒοΫΛಡ΋͏

  14. w 5IFNF)BOECPPL
 IUUQTEFWFMPQFSXPSEQSFTTPSHUIFNFT w 5IFNF3FWJFX(VJEFMJOFT
 IUUQTNBLFXPSEQSFTTPSHUIFNFTIBOECPPL SFWJFXSFRVJSFE w (PPHMF຋༁Ͱ΋ΘΓͱ·ͱ΋ʹಡΊ·͢ w

    Ҏ্ʂ ϋϯυϒοΫΛಡ΋͏
  15. w @TʢVOEFSTDPSFTʣ
 IUUQTVOEFSTDPSFTNF w 5XFOUZ5XFOUZɺ5XFOUZ/JOFUFFOʜ ࢀߟςʔϚ

  16. ςϯϓϨʔτλάΛ ࢖͓͏

  17. w %#಺ͷ஋΍ίϯςϯπΛऔಘ͢ΔͨΊʹ࢖༻͢Δ ؔ਺ w ྫ͑͹ɺHFU@IFBEFS ɺUIF@UJUMF ɺUIF@QPTU ͳͲ w 8PSE1SFTTͷઃఆ΍ίϯςϯπ͸શ෦%#ʹೖͬͯ

    ͍ΔͷͰ42-Ͱͱͬͯ͘Δ͜ͱ΋Ͱ͖Δ͚Ͳɺςϯ ϓϨʔτλά͕͋Δ৔߹͸ʮઈରʹʯςϯϓϨʔτ λάΛ࢖͍·͠ΐ͏ ςϯϓϨʔτλάͱ͸
  18. w ྫ͑͹HFU@IFBEFS ͷதʹ͸HFU@IFBEFSΞΫγϣϯϑοΫ w ྫ͑͹UIF@UJUMF ͷதʹ͸UIF@UJUMFϑΟϧλʔϑοΫ w ϓϥάΠϯʢ΍ίΞʣ͸͜ͷϑοΫʹର͠ॲཧΛ͓͜ͳ͏ͷ ͰɺςϯϓϨʔτλάΛ࢖͍ͬͯͳ͍ͱϓϥάΠϯʢ΍ί Ξʣͷॲཧ͕ൈ͚ͯ͠·͏ɻ

    w طଘͷςϯϓϨʔτλά͕͋Δʹ΋ؔΘΒͣಠࣗॲཧͰͳΜ ͱ͔ͯ͠͠·͏ͱҾ͖ܧ͕͗େมʢ௒͋Δ͋Δʣ ςϯϓϨʔτλάΛ࢖Θͳ͍ͱͲ͏ͳΔ͔
  19. 8PSE1SFTTͷηΦϦʔ ʹԊ͓͏

  20. w JOEFYQIQ͸࠷ޙͷࡆ w $44ͷಡΈࠐΈ͸XQ@FORVFVF@TUZMF  w +4ͷಡΈࠐΈ͸XQ@FORVFVF@TDSJQU  w ݟͨ໨ͱػೳͷ෼཭

    w FUD 8PSE1SFTTͷηΦϦʔʹԊ͓͏
  21. w 5FNQMBUF)JFSBSDIZ
 IUUQTEFWFMPQFSXPSEQSFTTPSHUIFNFTCBTJDT UFNQMBUFIJFSBSDIZ w JOEFYQIQ͸τοϓϖʔδ༻ͷςϯϓϨʔτʮͰ͸ͳ ͍ʯʂͲͷςϯϓϨʔτ΋Ϛον͠ͳ͔ͬͨͱ͖ͷ࠷ޙͷ ࡆͷςϯϓϨʔτɻ w τοϓϖʔδ༻͸GSPOUQBHFQIQɺ


    ϒϩάͷτοϓ͸IPNFQIQ JOEFYQIQ͸࠷ޙͷࡆ
  22. None
  23. w IFBEʹ௚ॻ͖ʁ w XQ@FORVFVF@TUZMF Λ࢖͏͜ͱͰಡΈࠐΈॱ ͷ੔ཧɺΩϟογϡରࡦɺϓϥάΠϯ౳͔Βͷ ແޮԽͳͲͷૢ࡞͕Մೳ $44ͷಡΈࠐΈ͸XQ@FORVFVF@TUZMF

  24. wp_enqueue_style( ‘ϋϯυϧ໊’, get_theme_file_uri( ‘/css/style.css’ ), [ ‘ઌʹಡΈ͍ͨ CSS ͷϋϯυϧ໊’, …

    ], filemtime( get_theme_file_path( ‘/css/style.css’ ) ) );
  25. w IFBEʹ௚ॻ͖ʁ w XQ@FORVFVF@TDSJQU Λ࢖͏͜ͱͰಡΈࠐΈॱ ͷ੔ཧɺΩϟογϡରࡦɺϓϥάΠϯ౳͔Βͷ ແޮԽͳͲͷૢ࡞͕Մೳ +4ͷಡΈࠐΈ͸XQ@FORVFVF@TDSJQU

  26. wp_enqueue_script( ‘ϋϯυϧ໊’, get_theme_file_uri( ‘/js/app.js’ ), [ ‘ઌʹಡΈ͍ͨ JS ͷϋϯυϧ໊’, …

    ], filemtime( get_theme_file_path( ‘/js/app.js’ ) ), true // ϑολʔ = trueɺhead = false );
  27. w IUUQTNBLFXPSEQSFTTPSHUIFNFTIBOECPPL SFWJFXSFRVJSFEQSFTFOUBUJPOWTGVODUJPOBMJUZ w ഑෍ςʔϚɺࣗࣾར༻डୗ։ൃͰͲ͜·Ͱ΍Δ͔ ͸ҧ͏ͱࢥ͍·͕͢ʜ w جຊతʹ͸ςʔϚΛ੾Γସ͑ͨͱ͖ʹফ͑ͨΒࠔ Δ΋ͷʢΧελϜ౤ߘλΠϓɺγϣʔτίʔυ౳ʣ ͸ϓϥάΠϯྖҬʹॻ͘͜ͱ͕ਪ঑͞Ε͍ͯ·͢ɻ

    ݟͨ໨ͱػೳͷ෼཭
  28. w ςʔϚ͕·ͱ΋͔Ͳ͏͔ࣗಈνΣοΫͰ͖·͢ɻ w ؆қతͳ΋ͷͳΒςʔϚνΣοΫϓϥάΠϯ͕ศར
 IUUQTXPSEQSFTTPSHQMVHJOTUIFNFDIFDL w ίϚϯυͰ΍Γ͍ͨɺνΣοΫ಺༰ΛΧελϚΠζ͍ͨ͠ ͳΒ8PSE1SFTT$PEJOH4UBOEBSETGPS1)1@$PEF4OJ⒎FS
 IUUQTHJUIVCDPN8PSE1SFTT8PSE1SFTT$PEJOH 4UBOEBSET

    FUD
  29. ϒϩοΫΤσΟλʔ ରԠ

  30. w #MPDL&EJUPS)BOECPPL
 IUUQTEFWFMPQFSXPSEQSFTTPSHCMPDL FEJUPS ϒϩοΫΤσΟλʔରԠ

  31. w 8PSE1SFTT͔ΒΤσΟλʔ͕มߋ w 8:4*8:(ΤσΟλʔʢΫϥγοΫΤσΟ λʔʣ͔ΒϒϩοΫΤσΟλʔʹ ϒϩοΫΤσΟλʔରԠ

  32. None
  33. None
  34. w ʮจষΛॻ͘ʯͱ͍͏جຊతͳૢ࡞ײ͸Ϋϥ γοΫΤσΟλʔͱ΄΅ಉ͡ w ϒϩοΫ୯ҐͰૢ࡞ɻฒͼସ͕͑Ͱ͖ͨΓૢ࡞ ײ͕޲্ɺઃఆ΋ϒϩοΫ୯ҐͰ࣋ͯΔ w )5.-͕͜ΘΕͳ͍ ϒϩοΫΤσΟλʔͷϝϦοτ

  35. w ʮΤσΟλʔͷதʹೖྗͨ͠จࣈʯ Λ૷০ w )5.-͕Α͘͜ΘΕΔͷͰɺ)5.- ͷཧղ͕ඞཁ ৽چΤσΟλʔͷ͕͍ͪ w ϒϩοΫΛॏͶͯίϯςϯπΛߏ੒ w

    )5.-Λॻ͔ͤͳ͍ͱ͍͏ڧ͍ҙࢤ w ಠࣗʹϒϩοΫΛ௥Ճ͢Δʹ͸ +BWB4DSJQUྗ 3FBDU +49 ͕ඞ ཁ ΫϥγοΫΤσΟλʔ ϒϩοΫΤσΟλʔ
  36. w ΫϥγοΫΤσΟλʔʢϓϥάΠϯʣͷαϙʔτ͸ ·Ͱ
 IUUQTNBLFXPSEQSFTTPSHDPSF DMBTTJDFEJUPSQMVHJOTVQQPSUXJOEPX w ϒϩοΫΤσΟλʔ͸(VUFOCFSHϓϩδΣΫτͷϑΣ ʔζɻϑΣʔζͱͯ͠αΠτશମͷϒϩοΫԽ͕ਐ ߦத
 IUUQTDBQJUBMQKQCMPDLCBTFEUIFNF

    ϒϩοΫΤσΟλʔରԠ
  37. w 5IFNF)BOECPPL
 IUUQTEFWFMPQFSXPSEQSFTTPSHUIFNFT w 5IFNF3FWJFX(VJEFMJOFT
 IUUQTNBLFXPSEQSFTTPSHUIFNFTIBOECPPL SFWJFXSFRVJSFE w #MPDL&EJUPS)BOECPPL
 IUUQTEFWFMPQFSXPSEQSFTTPSHCMPDLFEJUPS

    ·ͱΊ