-
Author
-
January 26, 2018 at 19:20 #186942WinDroidAnswersParticipant
Hi there,
we ‘re looking for a simple and easy way to hide on the menu the pages only useful for the administrators and moderators.
it is your demo dashboard, we call it the timeline.
We want that the normal user or subscriber can’t see it.
it is only a place/page for the staff members.
we want also to put inside some of this page the modules you put in the dashboard, plus these functions if it is possible, please help us to find a way or a light plugin to add this:
<modules to add>
1. slack channels
2. trello
3. most viewed pages on the site
4. recent topics on the form
5. latest views
6. latest comment (if we do not disable these function)
7. latest blog post
Thanks in advance for your kind reply,
WinDroid Answers Community
January 27, 2018 at 18:58 #187011Kieran_SQModeratorHi,
You can hide menu items using the plugin Menu Item Visibility Control which can be found for free in the WordPress plugin directory https://wordpress.org/plugins/menu-items-visibility-control/.
Once installed you can add logic to the individual menu items (see screenshot) via the field ‘visibility’.
To show only to those with the role administrator you can use
current_user_can('administrator')
To show to specific roles you can use
current_user_can('administrator') || current_user_can('editor')
To show to logged in users only you can use
is_user_logged_in()
And likewise you can use the below to show the menu item to logged out users only
!is_user_logged_in()
You can create any number of requirements to show the menu item using WordPress functions, you can see more about them here https://developer.wordpress.org/reference/functions/.
Thanks,
Kieran
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionIf you like the theme or the support you've received please consider leaving us a review on Themeforest!
Custom development requests can be sent to dev@seventhqueen.com, one of the development team will be happy to discuss your needs.
Attachments:
You must be logged in to view attached files.January 27, 2018 at 19:30 #187018WinDroidAnswersParticipantok then, we do not want to slow down the site, you think this plugin is light?
January 27, 2018 at 19:37 #187021Kieran_SQModeratorHi,
This plugin will not slowdown a site, it makes use of core functions that are always present in WordPress and exposes them in the menus section. All in all the code is 164 lines and is 3.9KB of data that is used on the back-end.
As a general rule of thumb it doesn’t matter how many plugins you use in WordPress with regards to speed – quality over quantity. Using only one poorly coded plugin can be slower than using 40 well coded plugins.
Thanks,
Kieran
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionIf you like the theme or the support you've received please consider leaving us a review on Themeforest!
Custom development requests can be sent to dev@seventhqueen.com, one of the development team will be happy to discuss your needs.
January 27, 2018 at 20:19 #187026WinDroidAnswersParticipantwait a second,
we just want to hide the item from the navmenu in the frontend, not in the backend,
this exactly: http://prntscr.com/i6f5q0January 27, 2018 at 20:25 #187031Kieran_SQModeratorHi,
I believe there is a miscommunication. The code is executed on the back-end – that does not mean that the code works on WP Admin menu items – it simply means there is no code or bloat on the front-end, thus users will not experience any issues with the site slowing down in any way. This will only affect front-end menu items.
Thanks,
Kieran.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionIf you like the theme or the support you've received please consider leaving us a review on Themeforest!
Custom development requests can be sent to dev@seventhqueen.com, one of the development team will be happy to discuss your needs.
January 27, 2018 at 20:37 #187034WinDroidAnswersParticipantok ok,
we make a try.
the important thing is that we can hide the tools/timeline/dashboard page to the normal user, only the admin and the moderator can see it.
we can use it for meeting and to discuss new community ideas and implementation.
What about the possibility of add this module on the dashboard page?
http://www.windroidanswers.com/timline/1. slack channels
2. trello
3. most viewed pages on the site
4. recent topics on the form
5. latest views
6. latest comment (if we do not disable these function)
7. latest blog post
January 27, 2018 at 20:54 #187039Kieran_SQModeratorHi,
With regards to all of the above features that you would like to add you would need to look into third party plugins / code or reach out to a developer to achieve this for you.
I do not know of any specific plugins for those features.
Kieran.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionIf you like the theme or the support you've received please consider leaving us a review on Themeforest!
Custom development requests can be sent to dev@seventhqueen.com, one of the development team will be happy to discuss your needs.
January 27, 2018 at 20:59 #187044WinDroidAnswersParticipantno one of these?
neither the latest forum posts?January 27, 2018 at 21:10 #187046Kieran_SQModeratorHi,
I created a sidebar in WP Admin > Appearance > Sidebars and titled it ‘bbPress Latest Topics – Dashboard’ I added the ‘bbPress Recent Topics’ widget to this sidebar. I then edited to the page titled ‘Timeline’ to include the widgetized sidebar, this may or may not visually work for you.
I am unable to check if this works for you on the front-end as the page is password protected – let me know.
If this doesn’t work for you, you can try using the ‘(BuddyApp) Recent Posts’ widget in this sidebar and selecting the post type as either topics, posts, comments etc as needed.
Kieran
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionIf you like the theme or the support you've received please consider leaving us a review on Themeforest!
Custom development requests can be sent to dev@seventhqueen.com, one of the development team will be happy to discuss your needs.
January 28, 2018 at 13:06 #187086WinDroidAnswersParticipantI’m so sorry, at the first time we just find this solution, to put a password to this menu item, but know we’re going to use the plugin you suggest and remove the password.
so if you need it it is:
Password timeline Nonsimollauncazzo(@2017)at this point i see what you’ve done is perfect, just we put it in a different order and i think we’re ok.
So as you do, i can create a sidebar in a different position and add this in the widgetized module of visual composer, am i right?January 28, 2018 at 16:22 #187100Kieran_SQModeratorHi,
Yes, you can go to WP Admin > Appearance > Sidebars > Button: ‘+ Add New Sidebar’ to create a new sidebar. Title the sidebar whatever you wish but in keeping with the theme I went with “Description Here – Dashboard”.
Once created you can go to WP Admin > Appearance > Widgets and add your desired widget(s) to the sidebar.
You can then recreate the content I made in the page by adding the Dashboard element and populating it with the widgetized sidebar element, selecting the sidebar you just created.
Thanks,
Kieran
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionIf you like the theme or the support you've received please consider leaving us a review on Themeforest!
Custom development requests can be sent to dev@seventhqueen.com, one of the development team will be happy to discuss your needs.
February 3, 2018 at 20:03 #187657WinDroidAnswersParticipantjust one more question to the hiding menu feature you explain to me early.
we need to show the ‘tools’ ( http://prntscr.com/i9nenc) idem only to administrator and moderators,
so what I have to write here (http://prntscr.com/i9nevc)?
current_user_can(‘administrator’) || current_user_can(‘moderator’)
is this correct?
I can see that moderator is not a user in WordPress, before doing something stupid, may you confirm this?
http://prntscr.com/i9nfjjFebruary 3, 2018 at 20:16 #187663Kieran_SQModeratorHi,
To confirm, the correct format would be
current_user_can('administrator') || current_user_can('moderator')
This is for roles, not specific users or usernames, bbPress adds the below roles so you should have a role of moderator
COPY CODEKeymaster – Can create, edit and delete other users’ forums, topics and replies. Can manage Tags, and moderate a forum with the moderation tools. Has access to global forum settings, tools, and importer. Moderator – Can create and edit forums. Can create, edit and delete other users’ topics and replies. Can manage Tags, and moderate a forum with the moderation tools. Participant – Can create and edit their own topics and replies. Spectator – Can only read topics and replies. Blocked – All capabilities are explicitly blocked.
Thanks,
Kieran
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionIf you like the theme or the support you've received please consider leaving us a review on Themeforest!
Custom development requests can be sent to dev@seventhqueen.com, one of the development team will be happy to discuss your needs.
February 3, 2018 at 20:52 #187677Kieran_SQModeratorGlad it works, I will mark this ticket as resolved.
If you have any other questions please feel free to open a new ticket and we’ll be happy to assist.
All the best,
Kieran
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionIf you like the theme or the support you've received please consider leaving us a review on Themeforest!
Custom development requests can be sent to dev@seventhqueen.com, one of the development team will be happy to discuss your needs.
-
AuthorPosts
The forum ‘Theme options & Demo content’ is closed to new topics and replies.