Adding Custom View Shortcode
-
Hi Guys,
I am trying to have a page in WordPress which shows two sections:
1) posts with 20 or more replies
2) posts with 19 or less repliesI have created a page with the following shortcodes:
[bbp-single-view id="twentyplus_posts"]
[bbp-single-view id="lesstwenty_posts"]I have added the following into my themes functions.php file:
// Add Custom View - Forum Home add_action( 'bb_init', 'view_twentyplus_posts_init' ); function view_twentyplus_posts_init() { $args = array( 'post_count' => '>19' ); bb_register_view( 'twentyplus_posts', __('Popular Posts', 'example'), $args, false ); } add_action( 'bb_init', 'view_lesstwenty_posts_init' ); function view_lesstwenty_posts_init() { $args = array( 'post_count' => '<20' ); bb_register_view( 'lesstwenty_posts', __('Forum Posts', 'example'), $args, false ); }
However all I get in response is:
Oh bother! No topics were found here!
Oh bother! No topics were found here!
Any idea what I am doing wrong here?
Viewing 13 replies - 1 through 13 (of 13 total)
Viewing 13 replies - 1 through 13 (of 13 total)
- You must be logged in to reply to this topic.