mithrandir (@mithrandir786)

Forum Replies Created

Viewing 7 replies - 26 through 32 (of 32 total)
  • @mithrandir786

    Participant

    It is definitely possible, to do so you will have to modify the template ‘content-archive-forum.php’
    you could use a custom loop to loop through the topics you would like to display based on the user role.

    Example:

    <div class="Featued">
        <?php
        //get current users user role
        $role = bbp_get_user_display_role(get_current_user_id());
        //if role is keymaster,moderator or participant display topics
        if ($role == "Keymaster" || $role == "Moderator" || $role == "Participant") {
            ?>
            <!--begin loop-->
            <?php
            $args = array('post_type' => 'topic', 'posts_per_page' => 10);
            $the_query = new WP_Query($args);
            if ($the_query->have_posts()) :
                ?>
                <!--the loop-->
                <?php while ($the_query->have_posts()) : $the_query->the_post(); ?>
                    <div>
                        <a class=”bbp-topic-permalink” href="<?php bbp_topic_permalink(); ?>"title=”<?php bbp_topic_title(); ?>”><?php bbp_topic_title(); ?></a>
                    </div>
                <?php endwhile; ?>
                <!--  end of the loop-->
                <?php wp_reset_postdata(); ?>
            <?php else: ?>
                <p><?php __e('Sorry, no posts matched your criteria.'); ?> </p>
            <?php
            endif;
            ?>
            <?php
        } elseif ($role == "Guest" || $role == "Blocked") {
            //do nothing
        }
        ?>
    </div>

    It is not very complicated depending on your level of expertise, but will require some knowledge of php and wordpress. If you could provide more information regarding what you are trying to achieve or any areas you are facing difficulty with, I can try my best to help out.

    @mithrandir786

    Participant

    you could specify ‘posts_per_page’ => -1
    which will loop through all

    @mithrandir786

    Participant

    The code below loops through specified number of topics in the forum. eg ‘posts_per_page’ => 100 .
    Please the read the link included below.

    if ( bbp_has_topics( array( 'author' => 0, 'show_stickies' => 'false', 'meta_key' => '_bbp_last_active_time', 'orderby' => 'meta_value', 'order' => 'DESC', 'post_parent' => 'any', 'posts_per_page' => 100 ) ) )
    		bbp_get_template_part( 'bbpress/loop', 'topics' );

    Link to topic:
    https://bbpress.org/forums/topic/display-list-of-topics-under-specific-forum/

    In reply to: Search css issues…

    @mithrandir786

    Participant

    The problem is not not in bbPress itself. After inspecting your website, at first glance, it appears you have the plugin bbPress – New UI installed which modifies the appearance of bbpress. It is possible the plugin has compatibility issues with your bbpress installation.

    In the browser I locally disabled the CSS loaded by the plugin and it fixed the overlapping and alignment issues. The reason changing themes does not help is that the plugin remains active regardless what theme you are using. I would recommend disabling the plugin and manually adjusting css.

    If you are not familiar with CSS, I highly recommend the plugin Yellow Pencil by Waspthemes. It is a visual CSS style editor and makes it very simple to style any WordPress theme or plugin, including bbPress.

    In reply to: Remove sidebar?

    @mithrandir786

    Participant

    The theme you are using is most likely overriding the bbpress default template, any template files you modify in the plugin folder are most likely being bypassed by theme or child theme. It would help to visit the bbpress codex which explains the template hierarchy in detail.

    Getting Started in Modifying the Main bbPress Template

    Step-by-Step Guide to Creating a Custom bbPress Theme

    I could try my best to help out if you could provide more information regarding which theme you are using, folder structure, child theme etc.

    @mithrandir786

    Participant

    You would have to use a conditional statement comparing against, if it is the forum archive. Depending on your theme and how bbPress has been implemented, the location of the title may vary. I am by no means an expert, but I can try my best to help out if you could provide more information.

    <h1 class="entry-title main-title">
        <?php
        // Display title on all pages except forum archive
        if (!bbp_is_forum_archive()) {
            the_title();
        }
        ?>
    </h1>

    @mithrandir786

    Participant

    suggest you set up a user called say ‘anon’ and let users know the password. That way they can log onto the site with that name and be anon

    Thank you very much for replying,

    I understand, I was hoping to integrate a more seamless experience for the users; the members of this board are not very tech savvy, as they have difficulty with basic tasks such as navigating a forum and remembering their own passwords. In this particular case, I don’t believe it would be a favorable solution.

    I am currently struggling to implement such a feature, which is admittedly *slightly* above my skill set, but on the bright side, I have been making progress. Hope I can post back later with my results. Many thanks again for your time and help.

Viewing 7 replies - 26 through 32 (of 32 total)