This topic has 15 replies, 2 voices, and was last updated 6 years by Kieran_SQ.

  • Author
  • #186942
     WinDroidAnswers
    Participant

    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

    #187011
     Kieran_SQ
    Moderator

    Hi,

    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 solution

    If 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.
    #187018
     WinDroidAnswers
    Participant

    ok then, we do not want to slow down the site, you think this plugin is light?

    #187021
     Kieran_SQ
    Moderator

    Hi,

    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 solution

    If 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.

    #187026
     WinDroidAnswers
    Participant

    wait a second,
    we just want to hide the item from the navmenu in the frontend, not in the backend,
    this exactly: http://prntscr.com/i6f5q0

    #187031
     Kieran_SQ
    Moderator

    Hi,

    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 solution

    If 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.

    #187034
     WinDroidAnswers
    Participant

    ok 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

    #187039
     Kieran_SQ
    Moderator

    Hi,

    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 solution

    If 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.

    #187044
     WinDroidAnswers
    Participant

    no one of these?
    neither the latest forum posts?

    #187046
     Kieran_SQ
    Moderator

    Hi,

    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 solution

    If 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.

    #187086
     WinDroidAnswers
    Participant

    I’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?

    #187100
     Kieran_SQ
    Moderator

    Hi,

    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 solution

    If 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.

    #187657
     WinDroidAnswers
    Participant

    just 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/i9nfjj

    #187663
     Kieran_SQ
    Moderator

    Hi,

    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 CODE
    Keymaster – 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 solution

    If 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.

    #187675
     WinDroidAnswers
    Participant

    perfect, it works fine!

    #187677
     Kieran_SQ
    Moderator

    Glad 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 solution

    If 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.

Viewing 16 posts - 1 through 16 (of 16 total)

The forum ‘Theme options & Demo content’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?