Skip to:
Content
Pages
Categories
Search
Top
Bottom

New Views Code Help

  • @erich199

    Participant

    I’m creating my own custom forum view using the register_views code. The function works but for some reason the url isn’t working. What am I missing?

           function my_custom_register_views() {
         // Latest Replies Custom View
        bbp_register_view(
            'latest-replies',
            __( 'Latest Replies', 'my_custom_register_views' ),
            apply_filters( 'bbp_register_view_latest_replies', array(
                    'orderby' => 'meta_value',
                    'order' => 'DESC',
                    'meta_key' => '_bbp_last_active_time',
                    'post_status' => array(bbp_get_public_status_id(), bbp_get_closed_status_id()),
                    'post_type' => bbp_get_topic_post_type(),
                    'show_stickies' => false
            )
        ) );
    }
Viewing 3 replies - 1 through 3 (of 3 total)
  • @robin-w

    Moderator

    I take it you have an add action statement

    add_action( 'bbp_register_views' ....

    View Topic By

    @erich199

    Participant

    @robin-w OMG I’m so dumb! I totally forgot the add_action wow. Thanks for that.

    @robin-w

    Moderator

    we’ve all been there 🙂 🙂

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