0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Wordpress参考サイト

Last updated at Posted at 2025-02-01

Wordpressについてのメモ

久しぶりにWordpressサイトを作る必要があり、情報をまとめました。

リファレンス集

・Wordpressサポート
https://ja.wordpress.org/support/

・Developer Resources
https://developer.wordpress.org/

・Wordpress Codex 日本語版(旧)
https://ja.wordpress.org/2021/09/06/codex-to-helphub/

・PHPマニュアル
https://www.php.net/manual/ja/index.php

オリジナルテンプレートについて

最低限のファイル構成

  • index.php
  • style.css
/*
Theme Name: テーマの名前を入れる
*/
  • functions.php ※ 準必須

よく使うファイル

page.php
single.php
archive.php
search.php
404.php
header.php
footer.php
sidebar.php
home.php
front-page.php
(トップページの設定について)
https://www.ad-muse.com/column/wp_front-page/#:~:text=%E3%81%93%E3%81%AE%E8%A8%AD%E5%AE%9A%E3%82%92%E8%A1%8C%E3%81%AA%E3%81%A3%E3%81%9F,index.php%E3%81%AB%E3%81%AA%E3%82%8A%E3%81%BE%E3%81%99%E3%80%82

ファイル構成

よく使うテンプレートタグ

現在使っているテーマフォルダまでのパス

外部ファイル

function my_script_init() {
  wp_enqueue_style("font-awesome", "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.8.2/css/all.min.css", array(), "5.8.2", "all");
  wp_enqueue_style("my", get_template_directory_uri() . "/css/style.css", array(), filemtime(get_theme_file_path('css/style.css')), "all");
  wp_enqueue_script("my", get_template_directory_uri() . "/js/script.js", array("jquery"), filemtime(get_theme_file_path('js/script.js')), true);
}
add_action("wp_enqueue_scripts", "my_script_init");

https://developer.wordpress.org/reference/functions/wp_enqueue_style/
https://developer.wordpress.org/reference/functions/wp_enqueue_script/
https://developer.wordpress.org/reference/functions/add_action/
https://developer.wordpress.org/reference/functions/wp_head/
https://developer.wordpress.org/reference/functions/wp_footer/
https://developer.wordpress.org/reference/functions/add_theme_support/
https://developer.wordpress.org/reference/functions/have_posts/
https://developer.wordpress.org/reference/functions/the_post/
https://developer.wordpress.org/reference/functions/paginate_links/
https://developer.wordpress.org/reference/functions/the_title/
https://developer.wordpress.org/reference/functions/the_excerpt/
https://developer.wordpress.org/reference/functions/the_permalink/
https://developer.wordpress.org/reference/functions/get_the_category/
https://developer.wordpress.org/reference/functions/has_post_thumbnail/
https://developer.wordpress.org/reference/functions/the_post_thumbnail/
https://developer.wordpress.org/apis/hooks/filter-reference/
https://developer.wordpress.org/apis/hooks/action-reference/
https://developer.wordpress.org/reference/functions/is_category/
https://developer.wordpress.org/reference/functions/is_tag/
https://developer.wordpress.org/reference/functions/is_date/

おすすめプラグイン

https://www.vektor-inc.co.jp/post/all-in-one-wp-migration/
https://ja.wordpress.org/plugins/show-current-template/
https://ja.wordpress.org/plugins/duplicate-post/
https://ja.wordpress.org/plugins/custom-post-type-ui/

便利ツール

おすすめページ

https://ascii.jp/elem/000/000/270/270115/
https://liginc.co.jp/web/wp/customize/92030
https://www.flapism.jp/wordpress/57/

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?