You can only have one tag_id
arg, that too should be an integer ( also =
check is made, you can’t have !=
check ). Try this:
function my_custom_views_init() {
$args = array(
'tag_id' => 35
);
bb_register_view(
'fruits',
'Fruit',
$args,
false
);
}
You may try to short-circuit the query though, as shown in this plugin – https://plugins-dev.bbpress.org/browser/my-views/trunk/my-views-statistics.php
You can only have one tag_id
arg, that too should be an integer ( also =
check is made, you can’t have !=
check ). Try this:
function my_custom_views_init() {
$args = array(
'tag_id' => 35
);
bb_register_view(
'fruits',
'Fruit',
$args,
false
);
}
You may try to short-circuit the query though, as shown in this plugin – https://plugins-dev.bbpress.org/browser/my-views/trunk/my-views-statistics.php
Thanks, Gautam, but that appears to just show all posts from Fruits (ie, not excluding Apples), unless I am missing something?
For this particular application, I’m now trying to set it up so “Fruit” is a forum (so it has a forum id instead of a tag id), and using “Apple” tag to include/exclude certain posts. I’m hoping the bb_query in the bbp plugin will be more flexible.
Thanks, Gautam, but that appears to just show all posts from Fruits (ie, not excluding Apples), unless I am missing something?
For this particular application, I’m now trying to set it up so “Fruit” is a forum (so it has a forum id instead of a tag id), and using “Apple” tag to include/exclude certain posts. I’m hoping the bb_query in the bbp plugin will be more flexible.
In the plugin, it would make use of WP_Query
which is a lot flexible – you would be able to do such things there afaik.
In the plugin, it would make use of WP_Query
which is a lot flexible – you would be able to do such things there afaik.