Jump to content

lindz5223

Circle Member
  • Posts

    80
  • Joined

  • Last visited

Posts posted by lindz5223

  1. On 4/29/2021 at 1:20 PM, creedon said:

    The method MB described will not work for v7.1.

    They took advantage of an unintentional method of slipping code into a place where SS didn't intend in v7.0. SS fixed that in v7.1.

    I have a solution for v7.1. It requires the business plan or above.

    Add the following to Settings > Advanced > Code Injection > HEADER.

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>

    Add the following to Settings > Advanced > Code Injection > FOOTER.

    <script>
    
      $( ( ) => {
      
        /*
        
          add mindbody login register link to navigation
          
          Version    : 0.1d0
          
          SS Version : 7.1
          
          By         : Thomas Creedon < http://www.tomsWeb.consulting/ >
          
          */
          
        const dataSiteId = '100795';
        
        const dataMbSiteId = '658429';
        
        // do not change anything below, there be the borg here
        
        $( '<script src="https://widgets.mindbodyonline.com/javascripts/healcode.js" type="text/javascript"><\/script>' +
          
          '<healcode-widget data-version="0.2" data-link-class="loginRegister" data-site-id="' + dataSiteId + '" data-mb-site-id="' + dataMbSiteId + '" data-type="account-link" data-inner-html="Login | Register" />' )
        
          .appendTo ( '.header-nav-list, .header-menu-nav-folder-content' );
          
        $( 'healcode-widget:first' )
        
          .addClass ( 'header-nav-item header-nav-item--collection header-nav-item--active' )
          
          .attr ( 'data-animation-role', 'header-element' );
          
        $( 'healcode-widget:last' )
        
          .addClass ( 'container header-menu-nav-item header-menu-nav-item--collection' );
          
        } );
        
      </script>

    This is for v7.1.

    Let us know how it goes.

    This works for me! But now it's affecting other widgets on my site. 😞

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.