Skip to content

Instantly share code, notes, and snippets.

@nyankichi-n-n
Created March 21, 2017 04:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nyankichi-n-n/795dc67c1fd69e7919946e3f5cdfa2be to your computer and use it in GitHub Desktop.
Save nyankichi-n-n/795dc67c1fd69e7919946e3f5cdfa2be to your computer and use it in GitHub Desktop.
[デモ会員サイト構築]14. フォーラム(掲示板)機能(bbPressの設定、カスタマイズ)
<?php
// 一行目はシンタックスハイライトするために追加しています。
// bbpressのパンくずを非表示
add_filter( 'bbp_no_breadcrumb', '__return_true' );
<?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