Sidemenu conditions.

Tagged: 

This topic contains 6 replies, has 3 voices, and was last updated by  Olivier 1 month, 1 week ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #11703

    Sandu Denis
    Participant
    • 6 Posts
    @sandudenis

    Hello,

    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

    #11704

    Sandu Denis
    Participant
    • 6 Posts
    @sandudenis

    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.

    #11705

    Sandu Denis
    Participant
    • 6 Posts
    @sandudenis
    This reply has been marked as private.
    #11742

    Olivier
    Moderator
    • 1758 Posts
    @themosaurusrex
    Themosaurus Support

    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:

    BuddyPress Integration

    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:

    Contact

    On a sidenote, to control the visibility of your menu items, it seems that the best solutions around are the following plugins:

    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,

    #12263

    Brian Robbins
    Participant
    • 13 Posts
    @brobbins

    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?

    #12382

    Olivier
    Moderator
    • 1758 Posts
    @themosaurusrex
    Themosaurus Support

    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:

    Adding Custom PHP Without Changing Your Child Theme

    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,

    #14550

    Olivier
    Moderator
    • 1758 Posts
    @themosaurusrex
    Themosaurus Support

    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-2617980

    To 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,

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.

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

The topic ‘Sidemenu conditions.’ is closed to new replies.