Home Forums Arnold WordPress Theme How to remove ability to click through to posts from Slider 1

This topic contains 3 replies, has 2 voices, and was last updated by  john 2 months, 3 weeks ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #14388

    john
    Participant

    Hi guys,

    Great theme, excited to finish setting up!

    I’d like my site to simply be Slider 1 as homepage, with no option to click through to any other pages or posts.

    Therefore, I’d like a click on Tab slider text to do nothing. And on tablet/mobile, just the 1 tap changes the image (rather than hover on desktop), but 2nd tap does nothing/the same. No other pages/posts!

    Can you advise how I can achieve this? I imagine it’s simple… or is it? Thanks in adv!

    #14393

    BWSM
    Keymaster

    Hi,

    It needs to change a js file in theme folder: /js/custom.theme.js, line337-389:

    update to:

    if(Modernizr.touchevents){
    
    			$('.bm-tab-slider-trigger-tilte').on('touchstart', function(e) {
    				var _item 		= 	jQuery(this),
    				     _id 		= _item.data('id'),
    			  		_logo_color = _item.data('color'); 
    
    			  	if(_default_logo != _logo_color) {
    			  		themeData.body.removeClass(_default_logo).addClass(_logo_color);
    			  		_default_logo = _logo_color;
    			  	}
    
    			  	if( !_item.parents('.bm-tab-slider-trigger').siblings('.bm-tab-slider-img').find('#'+_id).hasClass('bm-active') ) {
    					_item.parents('.bm-tab-slider-trigger').siblings('.bm-tab-slider-img').find('#'+_id).addClass('bm-active');
    					_item.parents('.bm-tab-slider-trigger').siblings('.bm-tab-slider-img').find('#'+_id).siblings('.bm-tab-slider-img-item').removeClass('bm-active');
    				}
    
    				if(!_item.hasClass('bm-active')) {
    					_item.addClass('bm-active');
    					_item.parent('.bm-tab-slider-trigger-item').siblings().find('.bm-tab-slider-trigger-tilte').removeClass('bm-active');
    					e.preventDefault();
    					return false;
    				} else {
    					return false;
    				}
    				
    			});
    
    		} else {
    
    			$('.bm-tab-slider-trigger-tilte').hover(function(){  
    				var _item 		= 	jQuery(this),
    				     _id 		= _item.data('id'),
    			  		_logo_color = _item.data('color');
    
    			  	if(_default_logo != _logo_color) {
    			  		themeData.body.removeClass(_default_logo).addClass(_logo_color);
    			  		_default_logo = _logo_color;
    			  	}
    
    				if(!_item.hasClass('bm-active')) {
    					_item.addClass('bm-active');
    					_item.parent('.bm-tab-slider-trigger-item').siblings().find('.bm-tab-slider-trigger-tilte').removeClass('bm-active');
    				}
    
    				if( !_item.parents('.bm-tab-slider-trigger').siblings('.bm-tab-slider-img').find('#'+_id).hasClass('bm-active') ) {
    					_item.parents('.bm-tab-slider-trigger').siblings('.bm-tab-slider-img').find('#'+_id).addClass('bm-active');
    					_item.parents('.bm-tab-slider-trigger').siblings('.bm-tab-slider-img').find('#'+_id).siblings('.bm-tab-slider-img-item').removeClass('bm-active');
    				}
    
    			},function(){
    				return false;
    			});
    
    			$('.bm-tab-slider-trigger-tilte').click(function(){
    				return false;
    			});
    
    		}
    		
    	}

    Regards!

    #14400

    john
    Participant

    Amazing. Will try this pronto. Thanks guys!

    #14408

    john
    Participant

    Update: it works beautifully. Thanks again!

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

You must be logged in to reply to this topic.