Home › Forums › Basel support forum › Custom Header
Custom Header
- This topic has 1 reply, 2 voices, and was last updated 8 years, 2 months ago by Artem Temos.
Viewing 2 posts - 1 through 2 (of 2 total)
-
AuthorPosts
-
September 20, 2016 at 3:29 pm #4254
lxyamericaParticipantwhile lane of code will replace main nav with ajax-search bar in STICKY HEADER?
i tried
navigation = header.find(".widgetarea-head").clone().html(), and '<div class="widgetarea-head">' + navigation + '</div>'
but nothing changed…
You guys helped me to modified this before,,,but i did’t backup before I updates theme..if you can reply me the name of search bar that will be great.
var body = $("body"), header = $(".main-header"), stickyHeader = header, headerHeight = getHeaderHeight(), headerStickedClass = "act-scroll", stickyClasses = '', stickyStart = 0, links = header.find('.main-nav .menu>li>a'); if( ! body.hasClass('enable-sticky-header') || header.length == 0 ) return; var logo = header.find(".site-logo").clone().html(), navigation = header.find(".main-nav").clone().html(), rightColumn = header.find(".right-column").clone().html(); var headerClone = [ '<div class="sticky-header header-clone">', '<div class="container">', '<div class="site-logo">' + logo + '</div>', '<div class="main-nav site-navigation basel-navigation">' + navigation + '</div>', '<div class="right-column">' + rightColumn + '</div>', '</div>', '</div>', ].join('');
I have this in child theme function.php
add_filter( 'basel_header_configuration', 'basel_custom_header_configuration', 1, 1 ); function basel_custom_header_configuration() { return array( 'container' => array( 'wrapp-header' => array( 'logo', 'widget_area', 'right-column' => array( 'header_links', 'cart', 'mobile_icon', ) ) ), ); }
September 20, 2016 at 5:32 pm #4265
Artem TemosKeymasterHello,
The code should look like this
var body = $("body"), header = $(".main-header"), stickyHeader = header, headerHeight = getHeaderHeight(), headerStickedClass = "act-scroll", stickyClasses = '', stickyStart = 0, links = header.find('.main-nav .menu>li>a'); if( ! body.hasClass('enable-sticky-header') || header.length == 0 ) return; var logo = header.find(".site-logo").clone().html(), navigation = header.find(".widgetarea-head").clone().html(), rightColumn = header.find(".right-column").clone().html(); var headerClone = [ '<div class="sticky-header header-clone">', '<div class="container">', '<div class="site-logo">' + logo + '</div>', '<div class="widgetarea-head">' + navigation + '</div>', '<div class="right-column">' + rightColumn + '</div>', '</div>', '</div>', ].join('');
And you need to replace this part inside the
js/functions.js
file and diable JS minification in Theme Settings -> Performance.Regards
-
AuthorPosts
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to create new topics. Login / Register