Skip to:
Content
Pages
Categories
Search
Top
Bottom

What does the single-view template do?

  • @anointed

    Participant

    I pretty much understand all the templates in bbPress with the exception of single-view.php

    Where is this template called and what is it used for?

Viewing 4 replies - 1 through 4 (of 4 total)
  • @tfume

    Member

    Apologies for bringing this up again but I’m stiffed if I can figure out how the single-view template files are used either.

    Anyone figure this out?

    @johnjamesjacoby

    Keymaster

    Topic views are specific ways to group topics together based on any criteria. bbPress comes with 1 view: Topics with no replies. Developers are free to extend the views in bbPress, much like we have here at bbPress.org with the support plugin.

    @tfume

    Member

    Ah topic views, that points me in the right direction thanks. For reference then if anyone needs it that means you can do stuff like this:

    add_action('bbp_register_views', 'view_popular_topics');
    function view_popular_topics() {
    bbp_register_view('popular-topics', __('Popular Topics'), array('meta_key' => '_bbp_reply_count', 'orderby' => 'meta_value_num'), false );
    }

    Then link to the view with:

    <a href="<?php bbp_view_url('popular-topics'); ?>"><?php bbp_view_title('popular-topics'); ?></a>

    There’s a couple of informative posts re this here:

    http://internet-alacarte.com/adding-custom-fields-to-bbpress-topics-then-filtering-topics-by-custom-fields-using-views/

    http://bbpep.com/blog/2011/04/01/creating-custom-views-in-bbpress/

    @mrentropy

    Participant

    Hi all,

    Is there a way to create a view that is limited to a specific forum?

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Skip to toolbar