{"id":8741,"date":"2025-09-01T08:27:58","date_gmt":"2025-08-31T23:27:58","guid":{"rendered":"https:\/\/code-plus.jp\/gp\/?p=8741"},"modified":"2026-01-08T11:17:14","modified_gmt":"2026-01-08T02:17:14","slug":"exunit-snsbutton-8741","status":"publish","type":"post","link":"https:\/\/code-plus.jp\/gp\/exunit-snsbutton-8741\/","title":{"rendered":"\u3010ExUnit\u3011SNS\u30b7\u30a7\u30a2\u30dc\u30bf\u30f3\u306e\u8868\u793a\u5834\u6240\u3092\u5909\u66f4\u3059\u308b\u65b9\u6cd5"},"content":{"rendered":"<p>WordPress\u306e\u4eba\u6c17\u30d7\u30e9\u30b0\u30a4\u30f3\u300cExUnit\uff08VK All in One Expantion Unit\uff09\u300d\u306eSNS\u30b7\u30a7\u30a2\u30dc\u30bf\u30f3\u306f\u3001\u6a19\u6e96\u3067\u306f\u8a18\u4e8b\u672c\u6587\u306e\u4e0b\u90e8\u306b\u8868\u793a\u3055\u308c\u307e\u3059\u3002\u3057\u304b\u3057\u3001\u5834\u5408\u306b\u3088\u3063\u3066\u306f\u8a18\u4e8b\u306e\u9014\u4e2d\u3084\u5225\u306e\u5834\u6240\u306b\u8868\u793a\u3057\u305f\u3044\u3053\u3068\u3082\u3042\u308a\u307e\u3059\u3088\u306d\u3002<\/p>\r\n<p>\u4eca\u56de\u306f\u3001ExUnit\uff08VK All in One Expantion Unit\uff09\u306eSNS\u30b7\u30a7\u30a2\u30dc\u30bf\u30f3\u306e\u8868\u793a\u5834\u6240\u3092\u81ea\u7531\u306b\u5909\u66f4\u3059\u308b\u65b9\u6cd5\u3092\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\r\n<h2 class=\"fz-xl\">\u30a2\u30af\u30b7\u30e7\u30f3\u30d5\u30c3\u30af\u3068\u306f\uff1f<\/h2>\r\n<p>\u307e\u305a\u3001\u7406\u89e3\u3057\u3066\u304a\u304d\u305f\u3044\u306e\u304c\u300c\u30a2\u30af\u30b7\u30e7\u30f3\u30d5\u30c3\u30af\u300d\u3068\u3044\u3046\u6982\u5ff5\u3067\u3059\u3002<\/p>\r\n<p><b class=\"fw-600\">\u30a2\u30af\u30b7\u30e7\u30f3\u30d5\u30c3\u30af<\/b>\u3068\u306f\u3001WordPress\u304c\u7528\u610f\u3057\u3066\u3044\u308b\u300c\u7279\u5b9a\u306e\u30bf\u30a4\u30df\u30f3\u30b0\u3067\u51e6\u7406\u3092\u5b9f\u884c\u3067\u304d\u308b\u5834\u6240\u300d\u306e\u3053\u3068\u3067\u3059\u3002WordPress\u5074\u304c\u51e6\u7406\u306e\u6d41\u308c\u306e\u4e2d\u306b\u7528\u610f\u3057\u305f\u300c\u5f15\u3063\u639b\u3051\u308b\u5834\u6240\u300d\u306b\u3001\u72ec\u81ea\u306e\u51e6\u7406\u3092\u633f\u5165\u3067\u304d\u308b\u4ed5\u7d44\u307f\u3067\u3059\u3002<\/p>\r\n<p><b class=\"fw-600\">\u4ee3\u8868\u7684\u306a\u30a2\u30af\u30b7\u30e7\u30f3\u30d5\u30c3\u30af\uff1a<\/b><\/p>\r\n<ul style=\"list-style-type: bullet;\">\r\n<li><code>wp_head<\/code> - \u30d8\u30c3\u30c0\u30fc\u5185\u3067\u5b9f\u884c<\/li>\r\n<li><code>wp_footer<\/code> - \u30d5\u30c3\u30bf\u30fc\u5185\u3067\u5b9f\u884c<\/li>\r\n<li><code>the_content<\/code> - \u6295\u7a3f\u5185\u5bb9\u306e\u8868\u793a\u6642\u306b\u5b9f\u884c<\/li>\r\n<\/ul>\r\n<h2 class=\"fz-xl\">SNS\u30b7\u30a7\u30a2\u30dc\u30bf\u30f3\u306e\u8868\u793a\u5834\u6240\u5909\u66f4\u65b9\u6cd5<\/h2>\r\n<h3 class=\"fz-ml\">\u30b9\u30c6\u30c3\u30d71\uff1aExUnit\uff08VK All in One Expantion Unit\uff09\u8a2d\u5b9a\u753b\u9762\u3067\u306e\u8a2d\u5b9a<\/h3>\r\n<ol style=\"list-style-type: decimal;\">\r\n<li>WordPress\u7ba1\u7406\u753b\u9762\u3067\u300cExUnit \u30e1\u30a4\u30f3\u8a2d\u5b9a\u300d\u3092\u958b\u304f<\/li>\r\n<li>\u300cSNS\u300d\u30bf\u30d6\u3092\u9078\u629e<\/li>\r\n<li>\u300c\u8868\u793a\u5834\u6240\uff08\u30aa\u30d7\u30b7\u30e7\u30f3\uff09\u300d\u6b04\u306b <code>vkSocialSet<\/code> \u3068\u5165\u529b<\/li>\r\n<li>\u8a2d\u5b9a\u3092\u4fdd\u5b58<\/li>\r\n<\/ol>\r\n<p><img decoding=\"async\" src=\"https:\/\/code-plus.jp\/gp\/wp-content\/uploads\/SS-2025-09-01-10.07.20.png\" alt=\"\" width=\"1079\" height=\"394\" class=\"alignnone size-full wp-image-8746\" \/><\/p>\r\n<p>\u3053\u306e\u8a2d\u5b9a\u306b\u3088\u308a\u3001\u6a19\u6e96\u306e\u8868\u793a\u4f4d\u7f6e\u3067\u306f\u306a\u304f\u3001\u30a2\u30af\u30b7\u30e7\u30f3\u30d5\u30c3\u30af\u7d4c\u7531\u3067\u306e\u8868\u793a\u306b\u5207\u308a\u66ff\u308f\u308a\u307e\u3059\u3002<\/p>\r\n<h3 class=\"fz-ml\">\u30b9\u30c6\u30c3\u30d72\uff1a\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u30d5\u30a1\u30a4\u30eb\u306b\u30b3\u30fc\u30c9\u3092\u8ffd\u52a0<\/h3>\r\n<p>\u8868\u793a\u3057\u305f\u3044\u5834\u6240\uff08\u4f8b\uff1a<code>single.php<\/code>\uff09\u306b\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3092\u8ffd\u52a0\u3057\u307e\u3059\uff1a<\/p>\r\n<pre><code class=\"language-php\">&lt;?php if (has_action('vkSocialSet')) {\r\n    do_action('vkSocialSet');\r\n} ?&gt;\r\n<\/code><\/pre>\r\n<h2 class=\"fz-xl\">\u3069\u3046\u3057\u3066\u3053\u306e\u30b3\u30fc\u30c9\u3067\u5909\u66f4\u3055\u308c\u308b\u306e\u304b\uff1f<\/h2>\r\n<p>\u3053\u306e\u30b3\u30fc\u30c9\u304c\u6a5f\u80fd\u3059\u308b\u7406\u7531\u3092\u9806\u756a\u306b\u8aac\u660e\u3057\u307e\u3059\uff1a<\/p>\r\n<h3 class=\"fz-ml\">1. \u30a2\u30af\u30b7\u30e7\u30f3\u30d5\u30c3\u30af\u306e\u767b\u9332<\/h3>\r\n<p>ExUnit\uff08VK All in One Expantion Unit\uff09\u306e\u8a2d\u5b9a\u753b\u9762\u3067 <code>vkSocialSet<\/code> \u3092\u6307\u5b9a\u3059\u308b\u3068\u3001\u30d7\u30e9\u30b0\u30a4\u30f3\u304c\u5185\u90e8\u7684\u306b\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u51e6\u7406\u3092\u884c\u3044\u307e\u3059\uff1a<\/p>\r\n<pre><code class=\"language-php\">add_action('vkSocialSet', 'sns_share_button_display_function');\r\n<\/code><\/pre>\r\n<p>\u3053\u308c\u3067\u300cvkSocialSet\u3068\u3044\u3046\u30a2\u30af\u30b7\u30e7\u30f3\u30d5\u30c3\u30af\u304c\u5b9f\u884c\u3055\u308c\u305f\u3068\u304d\u3001SNS\u30b7\u30a7\u30a2\u30dc\u30bf\u30f3\u3092\u8868\u793a\u3059\u308b\u300d\u3068\u3044\u3046\u767b\u9332\u304c\u5b8c\u4e86\u3057\u307e\u3059\u3002<\/p>\r\n<h3 class=\"fz-ml\">2. \u30a2\u30af\u30b7\u30e7\u30f3\u30d5\u30c3\u30af\u306e\u5b9f\u884c<\/h3>\r\n<p>\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u30d5\u30a1\u30a4\u30eb\u3067 <code>do_action('vkSocialSet')<\/code> \u3092\u8a18\u8ff0\u3059\u308b\u3068\uff1a<\/p>\r\n<pre><code class=\"language-php\">do_action('vkSocialSet'); \/\/ \u300cvkSocialSet\u306b\u767b\u9332\u3055\u308c\u305f\u51e6\u7406\u3092\u5b9f\u884c\u3057\u3066\u300d\u3068\u3044\u3046\u6307\u793a\r\n<\/code><\/pre>\r\n<p>WordPress\u304c\u300cvkSocialSet\u306b\u767b\u9332\u3055\u308c\u3066\u3044\u308b\u51e6\u7406\uff08SNS\u30b7\u30a7\u30a2\u30dc\u30bf\u30f3\u306e\u8868\u793a\uff09\u300d\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\r\n<h3 class=\"fz-ml\">3. \u7d50\u679c<\/h3>\r\n<p>\u6307\u5b9a\u3057\u305f\u5834\u6240\u306bSNS\u30b7\u30a7\u30a2\u30dc\u30bf\u30f3\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\r\n<h2 class=\"fz-xl\">\u30a8\u30e9\u30fc\u56de\u907f\u7528\u306e\u30b3\u30fc\u30c9<\/h2>\r\n<p>\u30d7\u30e9\u30b0\u30a4\u30f3\u304c\u7121\u52b9\u306b\u306a\u3063\u305f\u308a\u524a\u9664\u3055\u308c\u305f\u308a\u3059\u308b\u3068\u3001<code>do_action('vkSocialSet')<\/code> \u3092\u5b9f\u884c\u3057\u3066\u3082\u30a8\u30e9\u30fc\u306f\u51fa\u307e\u305b\u3093\u304c\u3001\u5ff5\u306e\u305f\u3081\u5b89\u5168\u306a\u66f8\u304d\u65b9\u3092\u3057\u3066\u304a\u304f\u3053\u3068\u3092\u304a\u3059\u3059\u3081\u3057\u307e\u3059\uff1a<\/p>\r\n<pre><code class=\"language-php\">&lt;?php if (has_action('vkSocialSet')) {\r\n    do_action('vkSocialSet');\r\n} ?&gt;\r\n<\/code><\/pre>\r\n<h3 class=\"fz-ml\">has_action()\u306e\u5f79\u5272<\/h3>\r\n<ul style=\"list-style-type: bullet;\">\r\n<li><code>has_action('vkSocialSet')<\/code> \u306f\u300cvkSocialSet\u30a2\u30af\u30b7\u30e7\u30f3\u30d5\u30c3\u30af\u306b\u4f55\u304b\u3057\u3089\u306e\u51e6\u7406\u304c\u767b\u9332\u3055\u308c\u3066\u3044\u308b\u304b\u300d\u3092\u30c1\u30a7\u30c3\u30af<\/li>\r\n<li>\u767b\u9332\u3055\u308c\u3066\u3044\u308b\u5834\u5408\u306e\u307f <code>do_action()<\/code> \u3092\u5b9f\u884c<\/li>\r\n<li>\u30d7\u30e9\u30b0\u30a4\u30f3\u304c\u7121\u52b9\u3067\u3082\u5b89\u5168\u306b\u30da\u30fc\u30b8\u304c\u8868\u793a\u3055\u308c\u308b<\/li>\r\n<\/ul>\r\n<h2 class=\"fz-xl\">\u5b9f\u969b\u306e\u4f7f\u7528\u4f8b<\/h2>\r\n<p>\u8a18\u4e8b\u30bf\u30a4\u30c8\u30eb\u306e\u76f4\u4e0b\u306bSNS\u30b7\u30a7\u30a2\u30dc\u30bf\u30f3\u3092\u8868\u793a\u3057\u305f\u3044\u5834\u5408\uff1a<\/p>\r\n<pre><code class=\"language-php\">&lt;h1 class=\"post-title\"&gt;\r\n    &lt;span&gt;&lt;?php the_title(); ?&gt;&lt;\/span&gt;\r\n&lt;\/h1&gt;\r\n\r\n&lt;!-- \u3053\u3053\u306bSNS\u30b7\u30a7\u30a2\u30dc\u30bf\u30f3\u3092\u8ffd\u52a0 --&gt;\r\n&lt;?php if (has_action('vkSocialSet')) {\r\n    do_action('vkSocialSet');\r\n} ?&gt;\r\n\r\n&lt;div class=\"post-content\"&gt;\r\n    &lt;?php the_content(); ?&gt;\r\n&lt;\/div&gt;\r\n<\/code><\/pre>\r\n<p>\u3053\u306e\u65b9\u6cd5\u306b\u3088\u308a\u3001\u8a18\u4e8b\u306e\u9014\u4e2d\u3084\u8907\u6570\u7b87\u6240\u306a\u3069\u3001\u81ea\u7531\u306a\u5834\u6240\u306bSNS\u30b7\u30a7\u30a2\u30dc\u30bf\u30f3\u3092\u914d\u7f6e\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>","protected":false},"excerpt":{"rendered":"WordPress\u306e\u4eba\u6c17\u30d7\u30e9\u30b0\u30a4\u30f3\u300cExUnit\uff08VK All in One Expantion Unit\uff09\u300d\u306eSNS\u30b7\u30a7\u30a2\u30dc\u30bf\u30f3\u306f\u3001\u6a19\u6e96\u3067\u306f\u8a18\u4e8b\u672c\u6587\u306e\u4e0b\u90e8\u306b\u8868\u793a\u3055\u308c\u307e\u3059\u3002\u3057\u304b\u3057\u3001\u5834\u5408\u306b\u3088\u3063\u3066\u306f\u8a18\u4e8b\u306e\u9014\u4e2d\u3084\u5225\u306e\u5834\u6240\u306b\u8868\u793a[...]","protected":false},"author":1,"featured_media":8832,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"sns_share_botton_hide":"","vkExUnit_sns_title":"","_vk_print_noindex":"","footnotes":"","vk-ltc-link":"","vk-ltc-target":"0"},"categories":[13],"tags":[109,110,102,103,111,112,108],"group":[],"class_list":["post-8741","post","type-post","status-publish","format-standard","has-post-thumbnail","category-wordpress","tag-sns","tag-110","tag-wordpress","tag-exunit","tag-php","tag-112","tag-108"],"acf":[],"veu_head_title_object":{"title":"","add_site_title":""},"_links":{"self":[{"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/posts\/8741","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/comments?post=8741"}],"version-history":[{"count":0,"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/posts\/8741\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/media\/8832"}],"wp:attachment":[{"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/media?parent=8741"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/categories?post=8741"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/tags?post=8741"},{"taxonomy":"group","embeddable":true,"href":"https:\/\/code-plus.jp\/gp\/wp-json\/wp\/v2\/group?post=8741"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}