﻿{"id":15176,"date":"2016-06-05T21:59:10","date_gmt":"2016-06-05T12:59:10","guid":{"rendered":"http:\/\/www.hcz.jp\/blog\/?p=15176"},"modified":"2019-02-14T11:44:51","modified_gmt":"2019-02-14T02:44:51","slug":"dw-question-answer-%ef%bc%8b-buddypress%ef%bd%9c%e3%83%af%e3%83%bc%e3%83%89%e3%83%97%e3%83%ac%e3%82%b9%e3%82%92%e3%82%ab%e3%82%b9%e3%82%bf%e3%83%9e%e3%82%a4%e3%82%ba","status":"publish","type":"post","link":"https:\/\/www.hcz.jp\/blog\/?p=15176","title":{"rendered":"DW Question Answer \uff0b BuddyPress\uff5c\u30ef\u30fc\u30c9\u30d7\u30ec\u30b9\u3092\u30ab\u30b9\u30bf\u30de\u30a4\u30ba"},"content":{"rendered":"<p><strong>DW Question Answer \uff0b BuddyPress\u3000\u3092\u5c0e\u5165\u306b\u3042\u305f\u308a\u3001\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3057\u305f\u3053\u3068\u3002<\/strong><\/p>\n<p><strong>\u3010 \u5099\u5fd8\u9332 \u3011<\/strong><\/p>\n<p>\u203b \u4eca\u56de\u884c\u3063\u305f\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u306f\u3001\u5168\u3066\u300c<strong>functions.php<\/strong>\u300d\u306b\u8a18\u8f09\u3059\u308b\u3002<\/p>\n<p>\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u5148\uff1a \/wp-content\/themes\/\u30c6\u30fc\u30de\u540d\/functions.php<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"background-color: #99ccff;\"><strong>\u30fb\u30ed\u30b0\u30a4\u30f3\u4e2d\u306e\u7ba1\u7406\u30d0\u30fc\u30ab\u30b9\u30bf\u30de\u30a4\u30ba<\/strong><\/span><\/p>\n<p>\u7ba1\u7406\u30d0\u30fc\u306e\u5de6\u7aef\u306b\u30ef\u30fc\u30c9\u30d7\u30ec\u30b9\u306e\u30ed\u30b4\uff08Wordpress\u306b\u3064\u3044\u3066\uff09\u3092\u524a\u9664\u3002<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/www.hcz.jp\/blog\/wp-content\/uploads\/2016\/06\/0604-01.jpg\" data-rel=\"lightbox-image-0\" data-magnific_type=\"image\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-15181\" src=\"https:\/\/www.hcz.jp\/blog\/wp-content\/uploads\/2016\/06\/0604-01-400x227.jpg\" alt=\"0604 01 400x227 DW Question Answer \uff0b BuddyPress\uff5c\u30ef\u30fc\u30c9\u30d7\u30ec\u30b9\u3092\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\" width=\"400\" height=\"227\" srcset=\"https:\/\/www.hcz.jp\/blog\/wp-content\/uploads\/2016\/06\/0604-01-400x227.jpg 400w, https:\/\/www.hcz.jp\/blog\/wp-content\/uploads\/2016\/06\/0604-01-150x85.jpg 150w, https:\/\/www.hcz.jp\/blog\/wp-content\/uploads\/2016\/06\/0604-01-300x170.jpg 300w, https:\/\/www.hcz.jp\/blog\/wp-content\/uploads\/2016\/06\/0604-01.jpg 420w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" title=\"DW Question Answer \uff0b BuddyPress\uff5c\u30ef\u30fc\u30c9\u30d7\u30ec\u30b9\u3092\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>\u305d\u306e\u4ed6\u3001\u5fc5\u8981\u306a\u3055\u305d\u3046\u306a\u9805\u76ee\u3082\u5e8f\u306b\u524a\u9664\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<div style=\"font-size: 12px;\">\n<pre><pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n\r\n\/\/\u7ba1\u7406\u30d0\u30fc\u9805\u76ee\u524a\u9664\r\nfunction remove_bar_menus( $wp_admin_bar ) {\r\n    $wp_admin_bar-&gt;remove_menu( 'wp-logo' );      \/\/ \u30ed\u30b4\r\n    $wp_admin_bar-&gt;remove_menu( 'view-site' );    \/\/ \u30b5\u30a4\u30c8\u540d - \u30b5\u30a4\u30c8\u3092\u8868\u793a\r\n    $wp_admin_bar-&gt;remove_menu( 'dashboard' );    \/\/ \u30b5\u30a4\u30c8\u540d - \u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\r\n    $wp_admin_bar-&gt;remove_menu( 'themes' );       \/\/ \u30b5\u30a4\u30c8\u540d - \u30c6\u30fc\u30de\r\n    $wp_admin_bar-&gt;remove_menu( 'customize' );    \/\/ \u30b5\u30a4\u30c8\u540d - \u30ab\u30b9\u30bf\u30de\u30a4\u30ba\r\n    $wp_admin_bar-&gt;remove_menu( 'comments' );     \/\/ \u30b3\u30e1\u30f3\u30c8\r\n    $wp_admin_bar-&gt;remove_menu( 'updates' );      \/\/ \u66f4\u65b0\r\n    $wp_admin_bar-&gt;remove_menu( 'view' );         \/\/ \u6295\u7a3f\u3092\u8868\u793a\r\n    $wp_admin_bar-&gt;remove_menu( 'new-content' );  \/\/ \u65b0\u898f\r\n    $wp_admin_bar-&gt;remove_menu( 'new-post' );     \/\/ \u65b0\u898f - \u6295\u7a3f\r\n    $wp_admin_bar-&gt;remove_menu( 'new-media' );    \/\/ \u65b0\u898f - \u30e1\u30c7\u30a3\u30a2\r\n    $wp_admin_bar-&gt;remove_menu( 'new-link' );     \/\/ \u65b0\u898f - \u30ea\u30f3\u30af\r\n    $wp_admin_bar-&gt;remove_menu( 'new-page' );     \/\/ \u65b0\u898f - \u56fa\u5b9a\u30da\u30fc\u30b8\r\n    $wp_admin_bar-&gt;remove_menu( 'new-user' );     \/\/ \u65b0\u898f - \u30e6\u30fc\u30b6\u30fc\r\n    $wp_admin_bar-&gt;remove_menu( 'search' );       \/\/ \u691c\u7d22\r\n}\r\nadd_action('admin_bar_menu', 'remove_bar_menus', 201);\r\n\r\n<\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"background-color: #99ccff;\">\u30fb\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\u5185\u306e\u8868\u793a\u30aa\u30d7\u30b7\u30e7\u30f3\u3068\u30d8\u30eb\u30d7\u3092\u524a\u9664<\/span><\/strong><\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/www.hcz.jp\/blog\/wp-content\/uploads\/2016\/06\/0604-02.png\" data-rel=\"lightbox-image-1\" data-magnific_type=\"image\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-15199\" src=\"https:\/\/www.hcz.jp\/blog\/wp-content\/uploads\/2016\/06\/0604-02.png\" alt=\"0604 02 DW Question Answer \uff0b BuddyPress\uff5c\u30ef\u30fc\u30c9\u30d7\u30ec\u30b9\u3092\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\" width=\"347\" height=\"275\" srcset=\"https:\/\/www.hcz.jp\/blog\/wp-content\/uploads\/2016\/06\/0604-02.png 347w, https:\/\/www.hcz.jp\/blog\/wp-content\/uploads\/2016\/06\/0604-02-150x119.png 150w, https:\/\/www.hcz.jp\/blog\/wp-content\/uploads\/2016\/06\/0604-02-300x238.png 300w\" sizes=\"auto, (max-width: 347px) 100vw, 347px\" title=\"DW Question Answer \uff0b BuddyPress\uff5c\u30ef\u30fc\u30c9\u30d7\u30ec\u30b9\u3092\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<div style=\"font-size: 12px;\">\n<pre><pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n\/\/\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\u3000\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8\u3092\u524a\u9664(\u7ba1\u7406\u8005\u4ee5\u5916)\r\nfunction remove_dashboard_widget() {\r\n\tif ( ! current_user_can( 'administrator' ) ) {\r\n\t \tremove_meta_box( 'dashboard_right_now', 'dashboard', 'normal' ); \/\/ \u6982\u8981\r\n\t \tremove_meta_box( 'dashboard_activity', 'dashboard', 'normal' ); \/\/ \u30a2\u30af\u30c6\u30a3\u30d3\u30c6\u30a3\r\n\t \tremove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' ); \/\/ \u30af\u30a4\u30c3\u30af\u30c9\u30e9\u30d5\u30c8\r\n\t \tremove_meta_box( 'dashboard_primary', 'dashboard', 'side' ); \/\/ WordPress\u30cb\u30e5\u30fc\u30b9\r\n\t}\r\n} \r\nadd_action('wp_dashboard_setup', 'remove_dashboard_widget' );\r\n\r\n<\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<p>\u203b\u524d\u3082\u3063\u3066\u8868\u793a\u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u300c\u6982\u8981\u300d\u3068\u300c\u30a2\u30af\u30c6\u30a3\u30d3\u30c6\u30a3\u300d\u306f\u8868\u793a\u3055\u305b\u3001\u5fc5\u8981\u306b\u5fdc\u3058\u3066<\/p>\n<p>\u4e0a\u8a18\u8a18\u8ff0\u3092\u5165\u529b\u30fb\u524a\u9664\u3067\u8abf\u6574\u3059\u308b\u3002\u305f\u3060\u3057\u65b0\u898f\u306e\u30e6\u30fc\u30b6\u30fc\u767b\u9332\u8005\u306b\u306f<\/p>\n<p>\u30c7\u30d5\u30a9\u30eb\u30c8\u6642\u306b\u8868\u793a\u3055\u308c\u3066\u3057\u307e\u3046\u306e\u3067\u3001<a href=\"https:\/\/www.hcz.jp\/blog\/?p=14996\" target=\"_blank\"><span style=\"background-color: #00ccff;\"><strong>\u3053\u308c<\/strong><\/span><\/a>\u3082\u3084\u3063\u3066\u304a\u304f\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"background-color: #99ccff;\"><strong>\u30fb\u7ba1\u7406\u753b\u9762\u4e0b\u90e8\u306e\u300cWordpress\u306e\u3054\u5229\u7528\u3042\u308a\u304c\u3068\u3046\u3054\u3056\u3044\u307e\u3059\u3002\u300d\u3092\u524a\u9664<\/strong><\/span><\/p>\n<div style=\"font-size: 12px;\">\n<pre><pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n\/\/\u7ba1\u7406\u753b\u9762\u4e0b\u90e8\u306e\u300cWordpress\u306e\u3054\u5229\u7528\u3042\u308a\u304c\u3068\u3046\u3054\u3056\u3044\u307e\u3059\u3002\u300d\u3092\u524a\u9664\r\nadd_filter('admin_footer_text', '__return_empty_string');\r\n<\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<p><span style=\"background-color: #99ccff;\"><strong>\u30fb\u7ba1\u7406\u753b\u9762\u4e0b\u90e8\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u756a\u53f7\u3092\u524a\u9664<\/strong><\/span><\/p>\n<div style=\"font-size: 12px;\">\n<pre><pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n\/\/\u7ba1\u7406\u753b\u9762\u4e0b\u90e8\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u756a\u53f7\u3092\u524a\u9664\r\nfunction remove_footer_version() {\r\n\tremove_filter( 'update_footer', 'core_update_footer' ); \r\n}\r\nadd_action( 'admin_menu', 'remove_footer_version' );\r\n<\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"background-color: #99ccff;\">\u30fb\u30ed\u30b0\u30a4\u30f3\u30ed\u30b4\u306e\u30ab\u30b9\u30bf\u30de\u30a4\u30ba<\/span><\/strong><\/p>\n<div style=\"font-size: 12px;\">\n<pre><pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\nfunction my_login_logo() { ?&gt;\r\n    \r\n&lt;style type=&quot;text\/css&quot;&gt;\r\n        body.login div#login h1 a {\r\n            background-image: url(&lt;?php echo get_stylesheet_directory_uri(); ?&gt;\/images\/login-logo.png);\r\n            padding-bottom: 30px;\r\n        }\r\n    &lt;\/style&gt;\r\n&lt;?php }\r\nadd_action( 'login_enqueue_scripts', 'my_login_logo' );\r\n\r\n\r\n\/\/\u30ed\u30b0\u30a4\u30f3\u30ed\u30b4\u306e\u30ea\u30f3\u30af\u5148\u5909\u66f4\r\nfunction login_logo_url() {\r\n    return get_bloginfo('url');\r\n}\r\nadd_filter('login_headerurl', 'login_logo_url');\r\n\r\n\r\n\/\/\u30ed\u30b0\u30a4\u30f3\u30ed\u30b4\u306etitle\u5c5e\u6027\u3092\u5909\u66f4\r\nfunction login_logo_title(){\r\n    return get_bloginfo('name');\r\n}\r\nadd_filter('login_headertitle','login_logo_title');\r\n<\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<p>\u203b\u30aa\u30ea\u30b8\u30ca\u30eb\u30ed\u30b4\uff08\u753b\u50cf\uff09\u306e\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u5148<\/p>\n<p>\/wp-content\/themes\/\u30c6\u30fc\u30de\u540d\/images\/login-logo.png<\/p>\n<p>\u5143\u753b\u50cf\u30b5\u30a4\u30ba\u306f\uff08\u5e4580px\u3001\u9ad8\u305580px\uff09<\/p>\n<p>\u3053\u308c\u4ee5\u4e0a\u306e\u30b5\u30a4\u30ba\u3067\u3082\u554f\u984c\u306a\u3044\u304c\u3001\u5143\u753b\u50cf\u30b5\u30a4\u30ba\u306b\u81ea\u52d5\u7e2e\u5c0f\u3055\u308c\u308b\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"background-color: #99ccff;\"><strong>\u30fb\u9001\u4fe1\u30e1\u30fc\u30eb\u306e\u30ab\u30b9\u30bf\u30de\u30a4\u30ba<\/strong><\/span><\/p>\n<p>\u9001\u4fe1\u30e1\u30fc\u30eb\u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u9001\u4fe1\u8005\u540d(\u5dee\u51fa\u4eba\u540d)\u304c\u300cWordPress\u300d\u3001\u9001\u4fe1\u5143\u30a2\u30c9\u30ec\u30b9\u304c<\/p>\n<p>\u300cwordpress@\u30b5\u30a4\u30c8\u306e\u30c9\u30e1\u30a4\u30f3\u540d\u300d\u306b\u306a\u3063\u3066\u3044\u308b\u306e\u3067\u3001\u72ec\u81ea\u306e\u3082\u306e\u306b\u5909\u66f4\u3002<\/p>\n<div style=\"font-size: 12px;\">\n<pre><pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n\/\/\u30e1\u30fc\u30eb\u306e\u5dee\u51fa\u4eba\u540d\u3092\u5909\u66f4\r\nfunction custom_mail_from_name( $from_name ) {\r\n\treturn 'KAWASAKI Motorcycle Q &amp; A';\r\n}\r\nadd_filter( 'wp_mail_from_name', 'custom_mail_from_name' );\r\n \r\n\r\n\/\/\u30e1\u30fc\u30eb\u306e\u9001\u4fe1\u5143\u30a2\u30c9\u30ec\u30b9\u3092\u5909\u66f4\r\nfunction custom_mail_from( $from_email ) {\r\n\treturn 'info@hcz.jp';\r\n}\r\nadd_filter( 'wp_mail_from', 'custom_mail_from' );\r\n<\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n<p>\u3057\u307e\u3044<\/p>\n","protected":false},"excerpt":{"rendered":"<p>DW Question Answer \uff0b BuddyPress\u3000\u3092\u5c0e\u5165\u306b\u3042\u305f\u308a\u3001\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3057\u305f\u3053\u3068\u3002 \u3010 \u5099\u5fd8\u9332 \u3011 \u203b \u4eca\u56de\u884c\u3063\u305f\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u306f\u3001\u5168\u3066\u300cfunctions.php\u300d\u306b\u8a18\u8f09\u3059\u308b\u3002 \u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u5148\uff1a \/w\u2026<\/p>\n","protected":false},"author":1,"featured_media":15181,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[56,2413,2993],"tags":[392,516,523,2301],"class_list":["post-15176","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress","category-dwqa","category-buddypress","tag-wordpress","tag-516","tag-523","tag-dw-question-answer"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.hcz.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts\/15176","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hcz.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hcz.jp\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hcz.jp\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hcz.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=15176"}],"version-history":[{"count":42,"href":"https:\/\/www.hcz.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts\/15176\/revisions"}],"predecessor-version":[{"id":23051,"href":"https:\/\/www.hcz.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts\/15176\/revisions\/23051"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.hcz.jp\/blog\/index.php?rest_route=\/wp\/v2\/media\/15181"}],"wp:attachment":[{"href":"https:\/\/www.hcz.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=15176"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hcz.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=15176"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hcz.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=15176"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}