SWELLはさまざまなフックが用意されていて、カスタマイズが容易です。
しかし使われている関数のコードも実は上書きできるので、さらに細かいカスタマイズも可能です。
そういった部分はif ( ! function_exists(....と記載されています。
本記事では、function_existsの検索で見つかった39件を整理しています。2026年10月1日にSWELL 2.19.0のソースと一覧のファイルパスを照合しました。検索結果にはWordPress標準関数の存在確認やPHPの互換処理も含まれるため、39件すべてが上書き対象ではありません。
ちなみにフックに関しては下記の記事にまとめております。

SWELLの関数39項目と上書き可否
細かい解説の前に一覧も作成しました。
上書きするときは、親テーマを直接編集せず、子テーマのfunctions.phpに同じ関数名・同じ引数で関数を定義します。子テーマのfunctions.phpは親テーマより先に読み込まれるため、親テーマ側のfunction_existsの判定で元の関数が定義されなくなります。作業前に子テーマのfunctions.phpをバックアップし、FTPなどで元に戻せる状態でステージング環境で試してください。不具合が出たら、追加した関数を削除すれば元に戻ります。SWELLを更新したときは、元の関数の引数や出力が変わっていないか確認してください。
上書きできそうな関数を調べる
プラグインのString Locatorを使ってコードif ( ! function_exists(で検索した結果です。
「上書き」欄の意味は、⚪︎が子テーマのfunctions.phpで同名の関数を定義して置き換えられるもの、△が名前空間を持つため別ファイルで読み込む構成が必要なもの、×がWordPress標準関数の存在確認やPHPの互換処理で上書きしてはいけないものです。
| 関数名 | ファイルパス | 上書き |
|---|---|---|
| wp_use_widgets_block_editor | wp-content/themes/swell/classes/Utility/Status.php | × |
| get_plugins | wp-content/themes/swell/classes/Theme_Data.php | × |
swl_parts__post_list_category | wp-content/themes/swell/lib/pluggable_parts/list_parts.php | ⚪︎ |
swl_parts__post_list_pv | wp-content/themes/swell/lib/pluggable_parts/list_parts.php | ⚪︎ |
swl_parts__post_list_author | wp-content/themes/swell/lib/pluggable_parts/list_parts.php | ⚪︎ |
swl_parts__page_title | wp-content/themes/swell/lib/pluggable_parts/page_parts.php | ⚪︎ |
swl_parts__term_title | wp-content/themes/swell/lib/pluggable_parts/page_parts.php | ⚪︎ |
swl_parts__the_post_author | wp-content/themes/swell/lib/pluggable_parts/page_parts.php | ⚪︎ |
swl_parts__pnlink | wp-content/themes/swell/lib/pluggable_parts/page_parts.php | ⚪︎ |
swl_parts__head_logo | wp-content/themes/swell/lib/pluggable_parts/header_parts.php | ⚪︎ |
swl_parts__gnav | wp-content/themes/swell/lib/pluggable_parts/header_parts.php | ⚪︎ |
| str_contains | wp-content/themes/swell/lib/polyfill/php_functions.php | × |
| echo_ad | wp-content/themes/swell/lib/shortcode.php | △ |
| echo_toc | wp-content/themes/swell/lib/shortcode.php | △ |
| spbr | wp-content/themes/swell/lib/shortcode.php | △ |
| pcbr | wp-content/themes/swell/lib/shortcode.php | △ |
| echo_icon | wp-content/themes/swell/lib/shortcode.php | △ |
| review_stars | wp-content/themes/swell/lib/shortcode.php | △ |
| post_link | wp-content/themes/swell/lib/shortcode.php | △ |
| blog_parts | wp-content/themes/swell/lib/shortcode.php | △ |
| ad_tag | wp-content/themes/swell/lib/shortcode.php | △ |
| balloon | wp-content/themes/swell/lib/shortcode.php | △ |
| full_wide_content | wp-content/themes/swell/lib/shortcode.php | △ |
| custom_banner | wp-content/themes/swell/lib/shortcode.php | △ |
| post_list | wp-content/themes/swell/lib/shortcode.php | △ |
| only_login | wp-content/themes/swell/lib/shortcode.php | △ |
| only_logout | wp-content/themes/swell/lib/shortcode.php | △ |
| echo_pr_notation | wp-content/themes/swell/lib/shortcode.php | △ |
| wp_render_layout_support_flag | wp-content/themes/swell/lib/gutenberg.php | × |
swl_parts__postdate | wp-content/themes/swell/lib/pluggable_parts.php | ⚪︎ |
swl_parts__title_date | wp-content/themes/swell/lib/pluggable_parts.php | ⚪︎ |
swl_parts__pr_banner | wp-content/themes/swell/lib/pluggable_parts.php | ⚪︎ |
swl_parts__blog_link | wp-content/themes/swell/lib/pluggable_parts.php | ⚪︎ |
swl_parts__blog_card | wp-content/themes/swell/lib/pluggable_parts.php | ⚪︎ |
swl_parts__mv_btn | wp-content/themes/swell/lib/pluggable_parts.php | ⚪︎ |
swl_parts__scroll_arrow | wp-content/themes/swell/lib/pluggable_parts.php | ⚪︎ |
swl_parts__pickup_banner | wp-content/themes/swell/lib/pluggable_parts.php | ⚪︎ |
swl_parts__pr_notation | wp-content/themes/swell/lib/pluggable_parts.php | ⚪︎ |
swl_get__a_catgory | wp-content/themes/swell/lib/pluggable.php | ⚪︎ |
SWELLで上書きできる関数
SWELLで上書きできる関数を紹介します。
swl_parts__post_list_category
記事リストのカテゴリー。
投稿に関連付けられたカテゴリーを表示するための関数です。
場所はwp-content/themes/swell/lib/pluggable_parts/list_parts.php
swl_parts__post_list_pv
記事リストに表示するPV
場所はwp-content/themes/swell/lib/pluggable_parts/list_parts.php
swl_parts__post_list_author
投稿リストの著者アイコンを取得する
場所はwp-content/themes/swell/lib/pluggable_parts/list_parts.php
swl_parts__page_title
ページタイトル周りの表示に関する関数
場所はwp-content/themes/swell/lib/pluggable_parts/page_parts.php
swl_parts__term_title
タームアーカイブページのタイトルを取得
場所はwp-content/themes/swell/lib/pluggable_parts/page_parts.php
swl_parts__the_post_author
著者アイコンを取得する
wp-content/themes/swell/lib/pluggable_parts/page_parts.php
swl_parts__pnlink
前後記事へのリンク。
wp-content/themes/swell/lib/pluggable_parts/page_parts.php
swl_parts__head_logo
ヘッダーロゴ
場所はwp-content/themes/swell/lib/pluggable_parts/header_parts.php
swl_parts__gnav
グローバルナビ
場所はwp-content/themes/swell/lib/pluggable_parts/header_parts.php
str_contains(上書き不可)
str_contains 関数を定義するためのものです。
str_contains は PHP 8.0 から導入された関数で、ある文字列が別の文字列に含まれているかどうかを判定します。PHP 8.0以上では標準の関数があるため、同じ名前で定義すると致命的エラーになります。上書きの対象にはしないでください。
場所はwp-content/themes/swell/lib/polyfill/php_functions.php
swl_get__a_catgory
投稿に関連付けられたカテゴリーのリストから、特定の条件に基づいて1つのカテゴリーを選択して返すためのものです。
場所はwp-content/themes/swell/lib/pluggable.php
SWELLで上書きできる関数│pluggable_parts.php
pluggable_parts.php 周りの上書きできる関数を紹介します。
swl_parts__postdate
公開日・更新日
場所はwp-content/themes/swell/lib/pluggable_parts.php
swl_parts__title_date
投稿タイトル横の日付
場所はwp-content/themes/swell/lib/pluggable_parts.php
swl_parts__pr_banner
プロモーションバナー
場所はwp-content/themes/swell/lib/pluggable_parts.php
swl_parts__blog_link
関連記事テキストリンク
場所はwp-content/themes/swell/lib/pluggable_parts.php
swl_parts__blog_card
関連記事ブログカード
場所はwp-content/themes/swell/lib/pluggable_parts.php
swl_parts__mv_btn
MVボタン。※メインビジュアルのボタンのこと
場所はwp-content/themes/swell/lib/pluggable_parts.php
swl_parts__scroll_arrow
MV用スクロールアイコン。※メインビジュアルのスクロールアイコン
場所はwp-content/themes/swell/lib/pluggable_parts.php
swl_parts__pickup_banner
ピックアップバナー
場所はwp-content/themes/swell/lib/pluggable_parts.php
swl_parts__pr_notation
PR表記
場所はwp-content/themes/swell/lib/pluggable_parts.php
SWELLで上書きできる関数│shortcode.php
shortcode.php周りの上書きできる関数を紹介します。△の関数は、SWELL_Theme\Shortcode 名前空間にあります。関数名とショートコード名は別です。たとえばecho_icon関数に対応するショートコードはiconとアイコンです。既存のfunctions.phpへnamespace宣言を途中から貼り付けると構文エラーになるため、名前空間を持つ別のPHPファイルを、子テーマのfunctions.phpから親テーマの同名関数が定義される前に読み込む構成にしてください。initなどの後のタイミングで読み込んでも置き換えられません。名前空間・引数・戻り値は、お使いのSWELLのshortcode.phpで確認してから書いてください。
echo_ad
広告を挿入するためのカスタムショートコード [ad] を定義
同じ名前空間内で同名の関数を定義することによって上書きすることができる
場所はwp-content/themes/swell/lib/shortcode.php
echo_toc
目次を挿入するためのカスタムショートコード [swell_toc] を定義
同じ名前空間内で同名の関数を定義することによって上書きすることができる
場所はwp-content/themes/swell/lib/shortcode.php
spbr
スマホの改行をするためのカスタムショートコード [spbr]を定義
同じ名前空間内で同名の関数を定義することによって上書きすることができる
場所はwp-content/themes/swell/lib/shortcode.php
pcbr
PCだけで改行するためのカスタムショートコード [pcbr]を定義
同じ名前空間内で同名の関数を定義することによって上書きすることができる
場所はwp-content/themes/swell/lib/shortcode.php
echo_icon
SWELLアイコンをするためのカスタムショートコード [icon] または [アイコン]を定義
同じ名前空間内で同名の関数を定義することによって上書きすることができる
場所はwp-content/themes/swell/lib/shortcode.php
ショートコード例
[icon class="icon-heart"][アイコン class="icon-star-full"]review_stars
レビュー用の星アイコンをするためのカスタムショートコード [review_stars] を定義
同じ名前空間内で同名の関数を定義することによって上書きすることができる
場所はwp-content/themes/swell/lib/shortcode.php
post_link
ブログカードを表示するためのカスタムショートコード [post_link]を定義
同じ名前空間内で同名の関数を定義することによって上書きすることができる
場所はwp-content/themes/swell/lib/shortcode.php
blog_parts
ブログパーツを表示するためのカスタムショートコード [blog_parts]を定義
同じ名前空間内で同名の関数を定義することによって上書きすることができる
場所はwp-content/themes/swell/lib/shortcode.php
ad_tag
広告タグを表示するためのカスタムショートコード [ad_tag]を定義
同じ名前空間内で同名の関数を定義することによって上書きすることができる
場所はwp-content/themes/swell/lib/shortcode.php
balloon
ふきだしを表示するためのカスタムショートコード [speech_balloon]を定義
同じ名前空間内で同名の関数を定義することによって上書きすることができる
場所はwp-content/themes/swell/lib/shortcode.php
full_wide_content
フルワイドコンテンツを表示するためのカスタムショートコード [full_wide_content]を定義
同じ名前空間内で同名の関数を定義することによって上書きすることができる
場所はwp-content/themes/swell/lib/shortcode.php
custom_banner
カスタムバナーを表示するためのカスタムショートコード [custom_banner]を定義
同じ名前空間内で同名の関数を定義することによって上書きすることができる
場所はwp-content/themes/swell/lib/shortcode.php
post_list
投稿リストを表示するためのカスタムショートコード [post_list]を定義
同じ名前空間内で同名の関数を定義することによって上書きすることができる
場所はwp-content/themes/swell/lib/shortcode.php
only_login
ログイン中だけの表示をするためのカスタムショートコード [only_login]を定義
同じ名前空間内で同名の関数を定義することによって上書きすることができる
場所はwp-content/themes/swell/lib/shortcode.php
only_logout
ログアウト中だけの表示をするためのカスタムショートコード [only_logout]を定義
同じ名前空間内で同名の関数を定義することによって上書きすることができる
場所はwp-content/themes/swell/lib/shortcode.php
echo_pr_notation
PR表記を表示するためのカスタムショートコード [pr_notation]を定義
同じ名前空間内で同名の関数を定義することによって上書きすることができる
場所はwp-content/themes/swell/lib/shortcode.php
まとめ
普段使ってるブロックや、記事の細かいパーツのコードが上書きできることがわかりました。
把握しておくと、テンプレートを使わずにより意図したカスタマイズができると思います。
子テーマの準備はSWELLの子テーマは必要か、ブロックや設定を含む全体像はテーマ全機能リファレンスにまとめています。



