{"id":418,"date":"2025-09-02T15:35:51","date_gmt":"2025-09-02T06:35:51","guid":{"rendered":"https:\/\/kyum.chu.jp\/wp\/?p=418"},"modified":"2026-03-20T06:59:38","modified_gmt":"2026-03-19T21:59:38","slug":"wordpress%e3%81%ae%e3%83%95%e3%83%83%e3%82%af%e3%81%a8%e3%81%af","status":"publish","type":"post","link":"https:\/\/achamaweb.tech\/?p=418","title":{"rendered":"WordPress\u306e\u30d5\u30c3\u30af\u3068\u306f"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">WordPress\u306e <strong>\u30a2\u30af\u30b7\u30e7\u30f3 (Action)<\/strong> \u3068 <strong>\u30d5\u30a3\u30eb\u30bf\u30fc (Filter)<\/strong> \u306f\u3001WordPress\u306e\u6a5f\u80fd\u3092\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3059\u308b\u305f\u3081\u306e\u4ed5\u7d44\u307f\u3067\u3059\u3002\u3053\u308c\u3089\u3092\u30d5\u30c3\u30af\uff08Hook\uff09\u3068\u7dcf\u79f0\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<style>\n.concave-box {\n  background-color: #e0e0e0;\n  white-space: pre-wrap;\n  border-radius: 4px;\n  box-shadow: inset 4px 4px 8px #bebebe,\n              inset -4px -4px 8px #ffffff;\n  padding: 4px;\n}\n<\/style>\n\n\n\n\n<\/div>\n<div class=\"block-group-box\">\n\n\n\n\n<h3>\u30a2\u30af\u30b7\u30e7\u30f3 (Action)<\/h3>\n\u30a2\u30af\u30b7\u30e7\u30f3\u306f\u3001WordPress\u306e\u7279\u5b9a\u306e\u51e6\u7406\u304c\u5b9f\u884c\u3055\u308c\u305f\u3068\u304d\u306b\u3001\u72ec\u81ea\u306e\u30b3\u30fc\u30c9\u3092\u8ffd\u52a0\u3059\u308b\u305f\u3081\u306e\u4ed5\u7d44\u307f\u3067\u3059\u3002<br>\n\u4e3b\u306b\u4f55\u304b\u3092\u300c\u8ffd\u52a0\u300d\u3057\u305f\u308a\u3001\u300c\u5b9f\u884c\u300d\u3057\u305f\u308a\u3059\u308b\u76ee\u7684\u3067\u4f7f\u308f\u308c\u307e\u3059\u3002<br>\n\u30a2\u30af\u30b7\u30e7\u30f3\u306f <br>\n\u30fb\u30d5\u30c3\u30af: add_action() \u95a2\u6570\u3092\u3067\u7279\u5b9a\u306e\u30a4\u30d9\u30f3\u30c8\u306b\u72ec\u81ea\u30b3\u30fc\u30eb\u30d0\u30c3\u30af\u95a2\u6570\u3092\u7d10\u4ed8\u3051<br>\n\u30fb\u5b9f\u884c: do_action()\u3067\u7d10\u4ed8\u3051\u3089\u308c\u305f\u95a2\u6570\u304c\u5b9f\u884c\u3055\u308c\u308b<br>\n\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002\n\n\n\n\n<hr><br>\u5177\u4f53\u4f8b<br>\n\u30c6\u30fc\u30de\u306e\u30d5\u30c3\u30bf\u30fc\u306b\u8457\u4f5c\u6a29\u60c5\u5831\u3092\u8ffd\u52a0\u3059\u308b wp_footer \u3092\u4f8b\u306b\u64ae\u308a\u307e\u3059\u3002<br>\n\u3053\u308c\u306f\u30d5\u30c3\u30bf\u30fc\u304c\u8aad\u307f\u8fbc\u307e\u308c\u308b\u76f4\u524d\u306b\u5b9f\u884c\u3055\u308c\u308b\u30a2\u30af\u30b7\u30e7\u30f3\u30d5\u30c3\u30af\u3067\u3059\u3002\n\n<div class=\"code-block\">\n  <div class=\"info-head\">wp_header\u3078\u306e\u8ffd\u52a0<\/div>\n    <pre><code>function add_my_copyright_to_footer() {\n    echo '<p>&copy; ' . date('Y') . ' My Website. All Rights Reserved.<\/p>';\n}\nadd_action('wp_footer', 'add_my_copyright_to_footer');    <\/code><\/pre>\n<\/div>\n<br>\n&#8216;wp-footer&#8217;\u3092\u51e6\u7406\u3059\u308b\u95a2\u6570\u306f wp-includes\\general-template.php \u306b\u3042\u308a\u307e\u3059\u3002\n<div class=\"code-block\">\n  <div class=\"info-head\">&#8216;wp-footer&#8217;\u306e\u5b9f\u884c<\/div>\n    <pre><code>    function get_footer( $name = null, $args = array() ) {\n\u3000\u3000       \uff1a\n        do_action( 'get_footer', $name, $args );\n\u3000\u3000       \uff1a\n    }    <\/code><\/pre>\n<\/div>\n\n\n\n\n<br><h5>\u3088\u304f\u4f7f\u3046\u30d5\u30c3\u30af<\/h5>\n<table border=\"1\" style=\"border-collapse: collapse; width: 100%; text-align: left;\">\n    <thead>\n        <tr style=\"background-color: #f2f2f2;\">\n            <th style=\"padding: 10px;\">\u30d5\u30c3\u30af\u540d<\/th>\n            <th style=\"padding: 10px;\">\u5b9f\u884c\u30bf\u30a4\u30df\u30f3\u30b0\u30fb\u7528\u9014<\/th>\n            <th style=\"padding: 10px;\">\u5f15\u6570<\/th>\n        <\/tr>\n    <\/thead>\n    <tbody>\n        <tr>\n            <td style=\"padding: 10px;\"><code>get_header<\/code><\/td>\n            <td style=\"padding: 10px;\">\u30d8\u30c3\u30c0\u30fc\uff08header.php\uff09\u304c\u8aad\u307f\u8fbc\u307e\u308c\u308b\u76f4\u524d\u3002\u7279\u5b9a\u306e\u30da\u30fc\u30b8\u3067\u8aad\u307f\u8fbc\u3080\u30d8\u30c3\u30c0\u30fc\u3092\u5207\u308a\u66ff\u3048\u308b\u969b\u306a\u3069\u306b\u4f7f\u7528\u3002<\/td>\n            <td style=\"padding: 10px;\">$name, $args<\/td>\n        <\/tr>\n        <tr>\n            <td style=\"padding: 10px;\"><code>get_footer<\/code><\/td>\n            <td style=\"padding: 10px;\">\u30d5\u30c3\u30bf\u30fc\uff08footer.php\uff09\u304c\u8aad\u307f\u8fbc\u307e\u308c\u308b\u76f4\u524d\u3002<\/td>\n            <td style=\"padding: 10px;\">$name, $args<\/td>\n        <\/tr>\n        <tr>\n            <td style=\"padding: 10px;\"><code>get_sidebar<\/code><\/td>\n            <td style=\"padding: 10px;\">\u30b5\u30a4\u30c9\u30d0\u30fc\uff08sidebar.php\uff09\u304c\u8aad\u307f\u8fbc\u307e\u308c\u308b\u76f4\u524d\u3002<\/td>\n            <td style=\"padding: 10px;\">$name, $args<\/td>\n        <\/tr>\n        <tr>\n            <td style=\"padding: 10px;\"><code>get_template_part_{$slug}<\/code><\/td>\n            <td style=\"padding: 10px;\">\u7279\u5b9a\u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u30d1\u30fc\u30c4\uff08\u4f8b\uff1acontent-single.php\u306a\u3069\uff09\u304c\u8aad\u307f\u8fbc\u307e\u308c\u308b\u969b\u306e\u52d5\u7684\u30d5\u30c3\u30af\u3002<\/td>\n            <td style=\"padding: 10px;\">$slug, $name, $args<\/td>\n        <\/tr>\n        <tr>\n            <td style=\"padding: 10px;\"><code>get_template_part<\/code><\/td>\n            <td style=\"padding: 10px;\">\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u30d1\u30fc\u30c4\u304c\u8aad\u307f\u8fbc\u307e\u308c\u308b\u969b\u306e\u6c4e\u7528\u30d5\u30c3\u30af\u3002<\/td>\n            <td style=\"padding: 10px;\">$slug, $name, $templates, $args<\/td>\n        <\/tr>\n        <tr>\n            <td style=\"padding: 10px;\"><code>pre_get_search_form<\/code><\/td>\n            <td style=\"padding: 10px;\">\u691c\u7d22\u30d5\u30a9\u30fc\u30e0\u304c\u8868\u793a\u3055\u308c\u308b\u76f4\u524d\u3002<\/td>\n            <td style=\"padding: 10px;\">$args<\/td>\n        <\/tr>\n        <tr>\n            <td style=\"padding: 10px;\"><code>wp_meta<\/code><\/td>\n            <td style=\"padding: 10px;\">\u30e1\u30bf\u30fb\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8\uff08\u30ed\u30b0\u30a4\u30f3\u30fb\u30ed\u30b0\u30a2\u30a6\u30c8\u7b49\u306e\u30ea\u30f3\u30af\uff09\u306e\u4e2d\u306b\u51fa\u529b\u3055\u308c\u308b\u3002<\/td>\n            <td style=\"padding: 10px;\">\u306a\u3057<\/td>\n        <\/tr>\n        <tr>\n            <td style=\"padding: 10px;\"><code>wp_head<\/code><\/td>\n            <td style=\"padding: 10px;\">HTML\u306e &lt;head&gt; \u30bf\u30b0\u5185\u3002CSS\u3001JS\u3001\u30e1\u30bf\u30bf\u30b0\u306e\u633f\u5165\u306b\u4f7f\u7528\u3055\u308c\u308b\u6700\u91cd\u8981\u30d5\u30c3\u30af\u306e\u4e00\u3064\u3002<\/td>\n            <td style=\"padding: 10px;\">\u306a\u3057<\/td>\n        <\/tr>\n        <tr>\n            <td style=\"padding: 10px;\"><code>wp_footer<\/code><\/td>\n            <td style=\"padding: 10px;\">HTML\u306e &lt;\/body&gt; \u7d42\u4e86\u30bf\u30b0\u76f4\u524d\u3002\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u8aad\u307f\u8fbc\u307f\u3084\u30d5\u30c3\u30bf\u30fc\u8981\u7d20\u306e\u8ffd\u52a0\u306b\u4f7f\u7528\u3002<\/td>\n            <td style=\"padding: 10px;\">\u306a\u3057<\/td>\n        <\/tr>\n        <tr>\n            <td style=\"padding: 10px;\"><code>wp_body_open<\/code><\/td>\n            <td style=\"padding: 10px;\">&lt;body&gt; \u30bf\u30b0\u304c\u958b\u59cb\u3055\u308c\u305f\u76f4\u5f8c\u3002\u30a2\u30af\u30bb\u30b9\u89e3\u6790\u30bf\u30b0\u306e\u633f\u5165\u7b49\u306b\u3088\u304f\u4f7f\u308f\u308c\u308b\u3002<\/td>\n            <td style=\"padding: 10px;\">\u306a\u3057<\/td>\n        <\/tr>\n        <tr>\n            <td style=\"padding: 10px;\"><code>wp_enqueue_code_editor<\/code><\/td>\n            <td style=\"padding: 10px;\">\u7ba1\u7406\u753b\u9762\u306a\u3069\u3067\u30b3\u30fc\u30c9\u30a8\u30c7\u30a3\u30bf\u30fc\uff08CodeMirror\uff09\u3092\u8aad\u307f\u8fbc\u3080\u969b\u306e\u8a2d\u5b9a\u5909\u66f4\u7528\u3002<\/td>\n            <td style=\"padding: 10px;\">$settings<\/td>\n        <\/tr>\n<tr>\n            <td style=\"padding: 10px;\"><code>admin_menu<\/code><\/td>\n            <td style=\"padding: 10px;\">\u7ba1\u7406\u753b\u9762\u306e\u30e1\u30a4\u30f3\u30e1\u30cb\u30e5\u30fc\u69cb\u9020\u304c\u4f5c\u6210\u3055\u308c\u308b\u969b\u3002\u30d7\u30e9\u30b0\u30a4\u30f3\u72ec\u81ea\u306e\u8a2d\u5b9a\u30e1\u30cb\u30e5\u30fc\u3092\u8ffd\u52a0\u3059\u308b\u306e\u306b\u5fc5\u9808\u3002<\/td>\n            <td style=\"padding: 10px;\">\u306a\u3057\uff08\u7a7a\u6587\u5b57\u5217\uff09<\/td>\n        <\/tr>\n    <\/tbody>\n<\/table>\n\n\n\n\n<hr><br>\u72ec\u81ea\u306e\u30a2\u30af\u30b7\u30e7\u30f3\u306e\u8ffd\u52a0<br>\n\u3042\u306a\u305f\u306e\u30c6\u30fc\u30de\u3084\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u4e2d\u306e\u3069\u3053\u304b\u3067<br>\ndo_action( &#8216;\u30a2\u30af\u30b7\u30e7\u30f3\u540d&#8217;, $result );<br>\n\u3068\u66f8\u304f\u3060\u3051\u3067\u8ffd\u52a0\u3055\u308c\u308b\u3002<br>\n<br>\n<h5>\u72ec\u81ea\u30d5\u30c3\u30af\u3092\u4f5c\u308b\u76ee\u7684<\/h5>\n<b>\u62e1\u5f35\u6027\uff08\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u5316\uff09: <\/b>\u6709\u540d\u306a\u30d7\u30e9\u30b0\u30a4\u30f3\uff08WooCommerce\u306a\u3069\uff09\u306b\u306f\u6570\u5343\u306e\u72ec\u81ea\u30d5\u30c3\u30af\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u4ed6\u306e\u958b\u767a\u8005\u304c\u300c\u652f\u6255\u3044\u5b8c\u4e86\u6642\u300d\u306a\u3069\u306e\u30bf\u30a4\u30df\u30f3\u30b0\u3067\u81ea\u7531\u306b\u6a5f\u80fd\u3092\u62e1\u5f35\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<br>\n<br>\n<b>\u30b3\u30fc\u30c9\u306e\u6574\u7406:<\/b> \u30e1\u30a4\u30f3\u306e\u51e6\u7406\u306e\u6d41\u308c\u3092\u6c5a\u3055\u305a\u306b\u3001\u5f8c\u4ed8\u3051\u3067\u300c\u30e1\u30fc\u30eb\u9001\u4fe1\u300d\u3084\u300c\u30ed\u30b0\u4fdd\u5b58\u300d\u306a\u3069\u306e\u30b5\u30d6\u51e6\u7406\u3092\u5207\u308a\u96e2\u3057\u3066\u7ba1\u7406\u3067\u304d\u307e\u3059\u3002<br>\n<br>\n<b>\u30c6\u30fc\u30de\u304b\u3089\u306e\u5236\u5fa1:<\/b> \u30d7\u30e9\u30b0\u30a4\u30f3\u304c\u8868\u793a\u3059\u308b\u5185\u5bb9\u306e\u300c\u524d\u300d\u3084\u300c\u5f8c\u300d\u306b\u3001\u30c6\u30fc\u30de\u5074\u3067\u30d0\u30ca\u30fc\u3084\u5e83\u544a\u3092\u5dee\u3057\u8fbc\u3081\u308b\u3088\u3046\u306b\u3057\u3066\u3042\u3052\u308b\u3068\u89aa\u5207\u3067\u3059\u3002<br>\n\n\n\n\n<\/div>\n<div class=\"block-group-box\">\n<h3>\u30d5\u30a3\u30eb\u30bf\u30fc (Filter)<\/h3>\n\n\u4f7f\u3044\u65b9<br>\n\u30d5\u30c3\u30af: add_filter() \u95a2\u6570\u3092\u4f7f\u3063\u3066\u3001\u7279\u5b9a\u306e\u30c7\u30fc\u30bf\u306b\u72ec\u81ea\u306e\u95a2\u6570\u3092\u7d10\u4ed8\u3051\u307e\u3059\u3002<br>\n\u5b9f\u884c: apply_filters() \u3067\u305d\u306e\u30c7\u30fc\u30bf\u3092\u51e6\u7406\u3059\u308b\u76f4\u524d\u306b\u3001\u7d10\u4ed8\u3051\u3089\u308c\u305f\u95a2\u6570\u306b\u30c7\u30fc\u30bf\u304c\u6e21\u3055\u308c\u307e\u3059\u3002<br>\n\u7d10\u4ed8\u3051\u3089\u308c\u305f\u95a2\u6570\u3067\u306f\u6e21\u3055\u308c\u305f\u30c7\u30fc\u30bf\u3092\u52a0\u5de5\u3057\u3066\u8fd4\u3057\u307e\u3059\u3002<br>\n\n\n\n\n<h4>\u4e3b\u306a\u30d5\u30a3\u30eb\u30bf\u30fc <\/h3>\n<table border=\"1\" style=\"border-collapse: collapse; width: 100%; text-align: left;\">\n    <thead>\n        <tr style=\"background-color: #f2f2f2;\">\n            <th style=\"padding: 10px;\">\u30d5\u30c3\u30af\u540d<\/th>\n            <th style=\"padding: 10px;\">\u5b9f\u884c\u30bf\u30a4\u30df\u30f3\u30b0\u30fb\u7528\u9014<\/th>\n            <th style=\"padding: 10px;\">\u5f15\u6570<\/th>\n        <\/tr>\n    <\/thead>\n    <tbody>\n        <tr>\n            <td style=\"padding: 10px;\"><code>the_content<\/code><\/td>\n            <td style=\"padding: 10px;\">\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304b\u3089\u53d6\u5f97\u3057\u305f\u6295\u7a3f\u672c\u6587\u3092\u753b\u9762\u306b\u51fa\u529b\u3059\u308b\u76f4\u524d\u3002\u5e83\u544a\u306e\u633f\u5165\u3084\u6587\u5b57\u5217\u306e\u7f6e\u63db\u306b\u4f7f\u7528\u3002<\/td>\n            <td style=\"padding: 10px;\">$content<\/td>\n        <\/tr>\n        <tr>\n            <td style=\"padding: 10px;\"><code>the_title<\/code><\/td>\n            <td style=\"padding: 10px;\">\u6295\u7a3f\u3084\u30da\u30fc\u30b8\u306e\u30bf\u30a4\u30c8\u30eb\u3092\u51fa\u529b\u3059\u308b\u76f4\u524d\u3002\u7279\u5b9a\u306e\u6761\u4ef6\u3067\u30bf\u30a4\u30c8\u30eb\u306b\u30d7\u30ec\u30d5\u30a3\u30c3\u30af\u30b9\u3092\u4ed8\u3051\u308b\u969b\u306a\u3069\u306b\u4f7f\u7528\u3002<\/td>\n            <td style=\"padding: 10px;\">$title, $id<\/td>\n        <\/tr>\n        <tr>\n            <td style=\"padding: 10px;\"><code>excerpt_length<\/code><\/td>\n            <td style=\"padding: 10px;\">\u81ea\u52d5\u751f\u6210\u3055\u308c\u308b\u629c\u7c8b\uff08excerpt\uff09\u306e\u9577\u3055\u3092\u6c7a\u5b9a\u3059\u308b\u969b\u3002\u8868\u793a\u3059\u308b\u6587\u5b57\u6570\u3092\u6570\u5024\u3067\u8fd4\u3059\u3002<\/td>\n            <td style=\"padding: 10px;\">$number<\/td>\n        <\/tr>\n        <tr>\n            <td style=\"padding: 10px;\"><code>body_class<\/code><\/td>\n            <td style=\"padding: 10px;\">body\u30bf\u30b0\u306b\u4ed8\u4e0e\u3055\u308c\u308b\u30af\u30e9\u30b9\u540d\u306e\u914d\u5217\u3092\u751f\u6210\u3059\u308b\u969b\u3002\u7279\u5b9a\u306e\u30da\u30fc\u30b8\u306b\u72ec\u81ea\u306eCSS\u30af\u30e9\u30b9\u3092\u8ffd\u52a0\u3059\u308b\u306e\u306b\u4fbf\u5229\u3002<\/td>\n            <td style=\"padding: 10px;\">$classes, $class<\/td>\n        <\/tr>\n        <tr>\n            <td style=\"padding: 10px;\"><code>wp_calculate_image_srcset<\/code><\/td>\n            <td style=\"padding: 10px;\">\u30ec\u30b9\u30dd\u30f3\u30b7\u30d6\u30a4\u30e1\u30fc\u30b8\u7528\u306esrcset\u5c5e\u6027\u3092\u751f\u6210\u3059\u308b\u969b\u3002\u753b\u50cfURL\u3084\u30b5\u30a4\u30ba\u306e\u30ea\u30b9\u30c8\u3092\u8abf\u6574\u3067\u304d\u308b\u3002<\/td>\n            <td style=\"padding: 10px;\">$sources, $size_array, $image_src, $image_meta, $attachment_id<\/td>\n        <\/tr>\n        <tr>\n            <td style=\"padding: 10px;\"><code>upload_mimes<\/code><\/td>\n            <td style=\"padding: 10px;\">\u30d5\u30a1\u30a4\u30eb\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308b\u969b\u306e\u8a31\u53ef\u3055\u308c\u3066\u3044\u308bMIME\u30bf\u30a4\u30d7\u3092\u5b9a\u7fa9\u3059\u308b\u969b\u3002SVG\u306a\u3069\u306e\u8a31\u53ef\u3055\u308c\u3066\u3044\u306a\u3044\u5f62\u5f0f\u3092\u8ffd\u52a0\u53ef\u80fd\u3002<\/td>\n            <td style=\"padding: 10px;\">$mimes, $user<\/td>\n        <\/tr>\n        <tr>\n            <td style=\"padding: 10px;\"><code>widget_text<\/code><\/td>\n            <td style=\"padding: 10px;\">\u30c6\u30ad\u30b9\u30c8\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8\u306e\u5185\u5bb9\u3092\u8868\u793a\u3059\u308b\u76f4\u524d\u3002\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8\u5185\u3067\u30b7\u30e7\u30fc\u30c8\u30b3\u30fc\u30c9\u3092\u5b9f\u884c\u3055\u305b\u305f\u3044\u5834\u5408\u306a\u3069\u3002<\/td>\n            <td style=\"padding: 10px;\">$text, $instance, $widget<\/td>\n        <\/tr>\n        <tr>\n            <td style=\"padding: 10px;\"><code>script_loader_tag<\/code><\/td>\n            <td style=\"padding: 10px;\">wp_enqueue_script\u3067\u767b\u9332\u3055\u308c\u305fscript\u30bf\u30b0\u3092\u51fa\u529b\u3059\u308b\u969b\u3002async\u3084defer\u5c5e\u6027\u3092\u4ed8\u4e0e\u3059\u308b\u5834\u5408\u306b\u4f7f\u7528\u3002<\/td>\n            <td style=\"padding: 10px;\">$tag, $handle, $src<\/td>\n        <\/tr>\n    <\/tbody>\n<\/table>\n\n\n\n<hr><br>\n\u5177\u4f53\u4f8b\n\u6295\u7a3f\u306e\u30bf\u30a4\u30c8\u30eb\u306b\u300c\u3010New!\u3011\u300d\u3068\u3044\u3046\u6587\u5b57\u5217\u3092\u8ffd\u52a0\u3059\u308b\u4f8b\u3067\u3059\u3002the_title \u306f\u3001\u6295\u7a3f\u306e\u30bf\u30a4\u30c8\u30eb\u304c\u8868\u793a\u3055\u308c\u308b\u76f4\u524d\u306b\u5b9f\u884c\u3055\u308c\u308b\u30d5\u30a3\u30eb\u30bf\u30fc\u30d5\u30c3\u30af\u3067\u3059\u3002\n\n<div class=\"code-block\">\n  <div class=\"info-head\">wp_header\u3078\u306e\u8ffd\u52a0<\/div>\n    <pre><code>function add_new_prefix_to_title($title) {\n    if (in_the_loop() && is_main_query()) {\n        $title = '\u3010New!\u3011' . $title;\n    }\n    return $title; \/\/ \u5909\u66f4\u3057\u305f\u30c7\u30fc\u30bf\u3092\u5fc5\u305a\u8fd4\u3059\n}\nadd_filter('the_title', 'add_new_prefix_to_title'); <\/code><\/pre>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>WordPress\u306e \u30a2\u30af\u30b7\u30e7\u30f3 (Action) \u3068 \u30d5\u30a3\u30eb\u30bf\u30fc (Filter) \u306f\u3001WordPress\u306e\u6a5f\u80fd\u3092\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3059\u308b\u305f\u3081\u306e\u4ed5\u7d44\u307f\u3067\u3059\u3002\u3053\u308c\u3089\u3092\u30d5\u30c3\u30af\uff08Hook\uff09\u3068\u7dcf\u79f0\u3057\u307e\u3059\u3002 \u30a2\u30af\u30b7\u30e7\u30f3 (Action) [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[11,14,12],"tags":[],"class_list":["post-418","post","type-post","status-publish","format-standard","hentry","category-wordpress-group","category-wordpress-info","category-wordpress-dev"],"acf":[],"_links":{"self":[{"href":"https:\/\/achamaweb.tech\/index.php?rest_route=\/wp\/v2\/posts\/418","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/achamaweb.tech\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/achamaweb.tech\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/achamaweb.tech\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/achamaweb.tech\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=418"}],"version-history":[{"count":36,"href":"https:\/\/achamaweb.tech\/index.php?rest_route=\/wp\/v2\/posts\/418\/revisions"}],"predecessor-version":[{"id":1572,"href":"https:\/\/achamaweb.tech\/index.php?rest_route=\/wp\/v2\/posts\/418\/revisions\/1572"}],"wp:attachment":[{"href":"https:\/\/achamaweb.tech\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=418"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/achamaweb.tech\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=418"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/achamaweb.tech\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=418"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}