Skip to:
Content
Pages
Categories
Search
Top
Bottom

SWITCH BY PAGE TYPE….


  • aluser
    Participant

    @aluser

    where am I wrong?
    How do I select the type of page?

    forum
    sub-forum list
    Mice list of sub-forum
    and topic-post

    <!– IF HAVE A PASSWORD–>
    <?php if ( post_password_required() ) : ?>
    <?php bbp_get_template_part( ‘form’, ‘protected’ );?>

    <!– IF NOT HAVE APASSOWORD –>
    <?php else: ?>

    <!– => LOOP CATEGORY –>
    <?php if ( bbp_is_forum_category() && !bbp_has_topics() ) : ?>
    <p>ITS A MACRO-FORUM (category)</p>
    <?php include “common/forums_category.php” ?>

    <!– => LOOP FORUMS –>
    <?php elseif ( bbp_is_forum_category() && bbp_has_topics() ) : ?>
    <p>ITS A SUB-FORUM</p>
    <?php include “common/forums_topiclist.php” ?>

    <!– => LOOP TOPIC OF FORUM –>
    <?php elseif (!bbp_is_forum_category() && bbp_has_topics() ) : ?>
    <p>ITS A TOPIC LIST</p>
    <?php include “common/forums_topic.php” ?>

    <?php endif; ?>

    <?php endif; ?>

    sorry for my unfamiliarity with php and bbPress …
    thank you

  • You must be logged in to reply to this topic.
Skip to toolbar