• I am having an issue with maps on my site not displaying correctly due to changes in Google’s API and it will take me a few days to resolve. In the meantime, I would like hide all of the maps on my site instead of deleting them to re-add once everything is working again. I am trying to update the CSS to display: none; but I can’t figure out the tags I need for this to work correctly. I have tried a myriad of combinations with no luck. Is anyone able to identify? Below are a few pages that the maps are located (overall there are 20+ pages with them but only two different page templates i need to apply this to).

    http://www.hallequitiesgroup.com/contact/
    http://www.hallequitiesgroup.com/portfolio/britton-place-2/

Viewing 4 replies - 1 through 4 (of 4 total)
  • .gmap-wrapper { display: none; }

    some advancement on that:
    if you want to keep seeing the progress on the maps, but hide them from any other (non-admin) users, try to add this code to functions.php of your child theme:

    add_filter( 'body_class', 'not_logged_in_admin_class' );
    
    function not_logged_in_admin_class( $classes ) {
    
    	if( !is_user_logged_in() || !current_user_can( 'manage_options' ) ) $classes[] = 'no-admin-logged-in';
    
    	return $classes;
    }

    then use this CSS:

    .no-admin-logged-in .gmap-wrapper { display: none; }

    Thread Starter smille09

    (@smille09)

    Thank you for your response! I tried the .gmap-wrapper and it doesn’t appear to be working.

    have you cleared the browser cache after adding the CSS?

    where did you add the CSS?

    do you still have the suggested CSS in your site?

    Thread Starter smille09

    (@smille09)

    Yes, it is still in the CSS of my site and I did clear my browser cache with no luck.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Hide a Section’ is closed to new replies.