Find Answers and Get Support › Forums › Cera – Intranet & Community Theme › Feature Requests › Sidemenu conditions.
Tagged: Implemented
- This topic has 6 replies, 3 voices, and was last updated 4 years, 10 months ago by
Themosaurusrex.
-
AuthorPosts
-
Sandu DenisParticipant@sandudenis
- 3 Topics
- 9 Posts
Up::0Hello,
1: I would like to hide the left menu from unregistred people on the website. it is a workaround/plugin/feature to achieve that ?
2: Can i hide different parts from the left menu for various membership levels ? ex. dashboard to be hidden for the free version. not only locked. but so he cannot see the button ?tnx
April 15, 2020 at 18:15 #11703Sandu DenisParticipant@sandudenis- 3 Topics
- 9 Posts
Also. im trying to lock the dashboard from general access and is not working only if i change the page atribution from dashboard template to default. if i do this i get a messy page.
any fix for this ? i would like to lock various parts from the free users. like forms,dashform and more.
April 15, 2020 at 18:32 #11704Sandu DenisParticipant@sandudenis- 3 Topics
- 9 Posts
This reply has been marked as private.April 15, 2020 at 18:35 #11705@themosaurusrex- 0 Topics
- 2048 Posts
Hi @sandudenis,
I really recommend that you use a dedicated plugin to restrict various access of your website instead of doiing it by yourself.
Our theme supports Paid Memberships Pro (https://www.paidmembershipspro.com/), which allow you to charge users, implement recurring payments and restrict content or areas of your website that will only be displayed to premium members. Plenty of PMPro add-ons are available on the author website to go further if necessary, including one for BuddyPress restrictions:
To know precisely which features will be restricted from your BuddyPress website, it’s best if you ask directly to the plugin authors.
They will be more informed and better suited to help you:
On a sidenote, to control the visibility of your menu items, it seems that the best solutions around are the following plugins:
- If Menu (https://wordpress.org/plugins/if-menu/)
- Nav Menu Roles (https://wordpress.org/plugins/nav-menu-roles/)
- Menu Item Visibility Control (https://wordpress.org/plugins/menu-items-visibility-control/)
- User Menus – Nav Menu Visibility (https://wordpress.org/plugins/user-menus/)
However, please note that neither of these plugins has been tested or integrated with our product. So, we can’t guarantee that everything will work as expected, even though we believe there shouldn’t be any issues as they mostly appear in the WP admin.
Best,
April 16, 2020 at 14:03 #11742Brian RobbinsParticipant@brobbins- 11 Topics
- 24 Posts
I used your method to hide the left menu for logged out users and this is what I get. I want to hide the entire left slider menu for logged out users, not simply the menu items it contains. Is there any way for a logged out user to see just the top header menu and logged in users to see the left menu?
May 1, 2020 at 15:15 #12263@themosaurusrex- 0 Topics
- 2048 Posts
Hi @brobbins,
Sorry for the late reply. We have been looking for the best way to do this. Everything takes more time with COVID-19 situation as we’re currently understaffed.
To force change the navigation display from vertical to horizontal, simply add the following code snippet to your website:
/** * Change the navigation display when user is not logged in. */ if ( ! is_user_logged_in() ) { function cera_custom_change_navigation_args( $args ) { $args['layout'] = 'classic-right'; $args['search_form_displayed'] = false; $args['background_color'] = get_theme_mod( 'navigation_background_color', CERA_NAVIGATION_BACKGROUND ); return $args; } add_filter( 'grimlock_navigation_args', 'cera_custom_change_navigation_args', 1000, 1 ); function cera_custom_change_vertical_navigation_args( $args ) { $args['displayed'] = false; return $args; } add_filter( 'grimlock_vertical_navigation_args', 'cera_custom_change_vertical_navigation_args', 1000, 1 ); function cera_custom_change_body_classes( $classes ) { $keys = array( array_search( 'grimlock--navigation-' . get_theme_mod( 'navigation_layout', CERA_NAVIGATION_LAYOUT ), $classes, true ), ); foreach( $keys as $key ) { if ( false !== $key ) { unset( $classes[ $key ] ); } } $classes[] = 'grimlock--navigation-classic-right'; return $classes; } add_filter( 'body_class', 'cera_custom_change_body_classes', 1000, 1 ); function cera_custom_enqueue_scripts() { wp_enqueue_script( 'grimlock-navigation-stick-to-top', GRIMLOCK_PLUGIN_DIR_URL . 'assets/js/navigation-stick-to-top.js', array( 'jquery' ), GRIMLOCK_VERSION, true ); wp_dequeue_script( 'slideout' ); wp_dequeue_script( 'grimlock-vertical-navigation' ); } add_action( 'wp_enqueue_scripts', 'cera_custom_enqueue_scripts', 1000 ); }
To add this code snippet to your site, we recommend that you use a the Code Snippets plugin (https://wordpress.org/plugins/code-snippets/). If you have never activated this plugin, please read the following post:
Please also note that we don’t provide any theme customization. So, you shouldn’t expect other snippets from us unless it’s to fix an issue stemming from our own codebase. We always try our best to help theme users whenever we can and only provide code snippets out of courtesy to prevent them from waiting for the next update.
Regards,
May 4, 2020 at 13:25 #12382@themosaurusrex- 0 Topics
- 2048 Posts
Hi,
We recently released a new version of Cera (v 1.1.2) to provide extra options to better control the visibility and behavior of its vertical navbar. Updating your theme, Grimlock plugins and all the other recommended plugins to the latest version should fix this issue.
If you have correctly updated the theme and Grimlock, the problem should now be fixed. You might still be seeing the issue because your browser cache is showing you an older version of the page (browsers do that to load pages faster). So to see that the issue is resolved you will need to empty your browser cache and reload the page. If you want to read more on what browser cache is and how to clear it, here is an article that might help you:
https://www.lifewire.com/how-to-clear-cache-2617980To update your theme, you can download and install the Envato Market plugin (https://envato.com/market-plugin/) on your WordPress site.
Once the plugin is installed and activated, go to “Envato Market” in your admin menu and follow the instructions under “Activate Envato API Connection”.
When this is done, you will see your purchased themes under the “Themes” tab and you should be able to update your theme from there by clicking the “Update available” button.
Cheers,
July 2, 2020 at 17:29 #14550 -
AuthorPosts
Hi there,
This topic has been inactive for a while now so we will be closing it to keep the forum tidy. Don't hesitate to create a new topic if you still need help and we'll be glad to help you!
Best regards,
The Themosaurus team.
The topic ‘Sidemenu conditions.’ is closed to new replies.