Created
March 21, 2017 04:42
-
-
Save nyankichi-n-n/795dc67c1fd69e7919946e3f5cdfa2be to your computer and use it in GitHub Desktop.
[デモ会員サイト構築]14. フォーラム(掲示板)機能(bbPressの設定、カスタマイズ)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// 一行目はシンタックスハイライトするために追加しています。 | |
// bbpressのパンくずを非表示 | |
add_filter( 'bbp_no_breadcrumb', '__return_true' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php get_header(); ?> | |
<?php get_template_part('breadcrumbs-page'); //固定ページパンくずリスト?> | |
<?php if ( is_bbpress() && !is_user_logged_in() ) : ?> | |
<p>ーーーーー<br /> | |
フォーラム(掲示板)はアクセス制限されています。<br />登録者の方は<a href="/login">ログイン</a>してください。新規登録するかたは<a href="/register">会員登録(無料)</a>をおこなってください。 | |
</p> | |
<?php else : ?> | |
<?php | |
if (have_posts()) : // WordPress ループ | |
while (have_posts()) : the_post(); // 繰り返し処理開始 ?> | |
// | |
// 略 | |
// | |
<?php | |
endif; | |
endif; | |
?> | |
<?php get_footer(); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment