Hey there mr_pa!
Here are the steps to resolve your issues:
1) To remove the html tag, you can implement this quick filter in your theme functions.php
add_filter( 'wp_stream_frontend_indicator', '__return_empty_string' )
2) To move stream down the menu link you can implement this other filter in your theme functions.php
add_filter( 'wp_stream_menu_position', 'XX' ) (note replace XX with the position you want i.e a number)
N.B You can also create a mu-plugins that implement those 2 filters instead of putting them in your theme. That way if you change theme, those filters will still be activated.
Have a great day!
Thread Starter
mr_pa
(@mr_pa)
Thanks for your speedy support.
Regarding to the second point, i already tried with the solution that you provided but i got this waring:
Warning: call_user_func_array() expects parameter 1 to be a valid callback, function '99' not found or invalid function name in .....
Note: i added the filter to the functions.php of my child theme.
Any suggestion?
It’s because 99 must be an integer, not a string. So just remove the quotes around it.
Thread Starter
mr_pa
(@mr_pa)
Unfortunately even without quotes the warning persists π
Oh, sorry I just looked at original code above, there needs to be a function called or an anonymous function that’s doing the return value.
I just tested these, and they work:
add_filter( 'wp_stream_frontend_indicator', function() { return false; } );
add_filter( 'wp_stream_menu_position', function() { return 99; } );
Thread Starter
mr_pa
(@mr_pa)
Ok i suppose to be solved with:
add_filter( 'wp_stream_menu_position', function() { return 99; } );
What do you think?
I’m so sorry about that! My bad on that function call!
Hello,
I’m trying to get menu under Dashboard, but it doesn’t seem to play nicely with the native wordpress hook to re-arrange menu order. The following doesn’t work to change the order and adding ‘admin.php?page=wp_stream’ to the array also has no effect.
function gs_custom_menu_order($menu_ord) {
return array(
'index.php',
'separator1',
'edit.php?post_type=page',
'edit.php',
'edit.php?post_type=mediahits',
'edit.php?post_type=author',
'edit.php?post_type=project',
);
}
add_filter('custom_menu_order', '__return_true');
add_filter('menu_order', 'gs_custom_menu_order');
add_filter( 'wp_stream_menu_position', function() { return 3; } );
How can we get this to work with the native WordPress hook?
Best,
Brian
Brian,
Are you saying that you want Stream to appear as a submenu of Dashboard? That is not supported since Stream has it’s own set of submenus.
Please clarify, thanks!
Nope. Just want it listed below the dashboard menu item, not a submenu.
Thanks for clarifying, Brian.
What you are describing is the default position of Stream: http://note.io/1qxuINI
Also see: https://github.com/x-team/wp-stream/blob/40c928b0105452b2c5f9fd9bb5537e6bc0c705d9/includes/admin.php#L123
I will need a little more insight into what you mean, specifically for your application.
Thanks. That helps me understand.
I guess the problem is when I use this filter to change the menu order of other items it messes up the placement of the Stream menu item, putting it below my Project CPT (‘edit.php?post_type=project’).
When I try to include Stream (‘admin.php?page=wp_stream’) and add it to the array it doesn’t seem to be recognized. Not sure why.
Best,
Brian