initial
This commit is contained in:
@@ -0,0 +1 @@
|
||||
@charset "UTF-8";@font-face{font-family:slick;src:url(fonts/slick.eot);src:url(fonts/slick.eot?#iefix) format("embedded-opentype"),url(fonts/slick.woff) format("woff"),url(fonts/slick.ttf) format("truetype"),url(fonts/slick.svg#slick) format("svg");font-weight:400;font-style:normal}.slick-next,.slick-prev{position:absolute;top:50%;display:block;padding:0;height:20px;width:20px;line-height:0;font-size:0;cursor:pointer;background:0 0;color:transparent;border:none;transform:translate(0,-50%)}.slick-next:focus .slick-next-icon,.slick-next:focus .slick-prev-icon,.slick-next:hover .slick-next-icon,.slick-next:hover .slick-prev-icon,.slick-prev:focus .slick-next-icon,.slick-prev:focus .slick-prev-icon,.slick-prev:hover .slick-next-icon,.slick-prev:hover .slick-prev-icon{opacity:1}.slick-next:focus,.slick-prev:focus{top:calc(50% - 1px)}.slick-next:focus .slick-next-icon,.slick-next:focus .slick-prev-icon,.slick-prev:focus .slick-next-icon,.slick-prev:focus .slick-prev-icon{color:orange;font-size:28px;margin-left:-2px}.slick-next.slick-disabled,.slick-prev.slick-disabled{cursor:default}.slick-next.slick-disabled .slick-next-icon,.slick-next.slick-disabled .slick-prev-icon,.slick-prev.slick-disabled .slick-next-icon,.slick-prev.slick-disabled .slick-prev-icon{opacity:.25}.slick-next .slick-next-icon,.slick-next .slick-prev-icon,.slick-prev .slick-next-icon,.slick-prev .slick-prev-icon{display:block;color:#000;opacity:.75;font-family:slick;font-size:24px;line-height:1}.slick-prev{left:-25px}[dir=rtl] .slick-prev{left:auto;right:-25px}.slick-prev .slick-prev-icon:before{content:"←"}[dir=rtl] .slick-prev .slick-prev-icon:before{content:"→"}.slick-next{right:-25px}[dir=rtl] .slick-next{left:-25px;right:auto}.slick-next .slick-next-icon:before{content:"→"}[dir=rtl] .slick-next .slick-next-icon:before{content:"←"}.slick-slider{margin-bottom:30px}.slick-slider.slick-dotted{margin-bottom:60px}.slick-dots{position:absolute;bottom:-30px;display:block;padding:0;margin:0;width:100%;list-style:none;text-align:center}.slick-dots li{position:relative;display:inline-block;margin:0 5px;padding:0}.slick-dots li button{display:block;height:20px;width:20px;margin-top:-4px;margin-left:-4px;line-height:0;font-size:0;color:transparent;border:0;background:0 0;cursor:pointer}.slick-dots li button:focus .slick-dot-icon,.slick-dots li button:hover .slick-dot-icon{opacity:1}.slick-dots li button:focus .slick-dot-icon:before{color:orange}.slick-dots li button .slick-dot-icon{color:#000;opacity:.25}.slick-dots li button .slick-dot-icon:before{position:absolute;top:0;left:0;content:"•";font-family:slick;font-size:12px;line-height:1;text-align:center;transition:all .05s linear}.slick-dots li.slick-active button:focus .slick-dot-icon{color:orange;opacity:1}.slick-dots li.slick-active button .slick-dot-icon{color:#000;opacity:1}.slick-dots li.slick-active button .slick-dot-icon:before{margin-top:-3px;margin-left:-2px;font-size:18px}.slick-sr-only{border:0!important;clip:rect(1px,1px,1px,1px)!important;-webkit-clip-path:inset(50%)!important;clip-path:inset(50%)!important;height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;width:1px!important;white-space:nowrap!important}.slick-autoplay-toggle-button{position:absolute;left:5px;bottom:-32px;z-index:10;opacity:.75;background:0 0;border:0;cursor:pointer;color:#000}.slick-autoplay-toggle-button:focus,.slick-autoplay-toggle-button:hover{opacity:1}.slick-autoplay-toggle-button:focus{color:orange}.slick-autoplay-toggle-button .slick-pause-icon:before{content:"⏸";width:20px;height:20px;font-family:slick;font-size:18px;font-weight:400;line-height:20px;text-align:center}.slick-autoplay-toggle-button .slick-play-icon:before{content:"▶";width:20px;height:20px;font-family:slick;font-size:18px;font-weight:400;line-height:20px;text-align:center}
|
||||
@@ -0,0 +1 @@
|
||||
.slick-slider{position:relative;display:block;box-sizing:border-box;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-ms-touch-action:pan-y;touch-action:pan-y;-webkit-tap-highlight-color:transparent}.slick-list{position:relative;overflow:hidden;display:block;margin:0;padding:0}.slick-list:focus{outline:0}.slick-list.dragging{cursor:pointer;cursor:hand}.slick-slider .slick-list,.slick-slider .slick-track{-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.slick-track{position:relative;left:0;top:0;display:block;margin-left:auto;margin-right:auto}.slick-track:after,.slick-track:before{content:"";display:table}.slick-track:after{clear:both}.slick-loading .slick-track{visibility:hidden}.slick-slide{float:left;height:100%;min-height:1px;display:none}[dir=rtl] .slick-slide{float:right}.slick-slide img{display:block}.slick-slide.slick-loading img{display:none}.slick-slide.dragging img{pointer-events:none}.slick-initialized .slick-slide{display:block}.slick-loading .slick-slide{visibility:hidden}.slick-vertical .slick-slide{display:block;height:auto;border:1px solid transparent}.slick-arrow.slick-hidden{display:none}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,12 @@
|
||||
/*!
|
||||
* imagesLoaded PACKAGED v5.0.0
|
||||
* JavaScript is all like "You images are done yet or what?"
|
||||
* MIT License
|
||||
*/
|
||||
!function(t,e){"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,(function(){function t(){}let e=t.prototype;return e.on=function(t,e){if(!t||!e)return this;let i=this._events=this._events||{},s=i[t]=i[t]||[];return s.includes(e)||s.push(e),this},e.once=function(t,e){if(!t||!e)return this;this.on(t,e);let i=this._onceEvents=this._onceEvents||{};return(i[t]=i[t]||{})[e]=!0,this},e.off=function(t,e){let i=this._events&&this._events[t];if(!i||!i.length)return this;let s=i.indexOf(e);return-1!=s&&i.splice(s,1),this},e.emitEvent=function(t,e){let i=this._events&&this._events[t];if(!i||!i.length)return this;i=i.slice(0),e=e||[];let s=this._onceEvents&&this._onceEvents[t];for(let n of i){s&&s[n]&&(this.off(t,n),delete s[n]),n.apply(this,e)}return this},e.allOff=function(){return delete this._events,delete this._onceEvents,this},t})),
|
||||
/*!
|
||||
* imagesLoaded v5.0.0
|
||||
* JavaScript is all like "You images are done yet or what?"
|
||||
* MIT License
|
||||
*/
|
||||
function(t,e){"object"==typeof module&&module.exports?module.exports=e(t,require("ev-emitter")):t.imagesLoaded=e(t,t.EvEmitter)}("undefined"!=typeof window?window:this,(function(t,e){let i=t.jQuery,s=t.console;function n(t,e,o){if(!(this instanceof n))return new n(t,e,o);let r=t;var h;("string"==typeof t&&(r=document.querySelectorAll(t)),r)?(this.elements=(h=r,Array.isArray(h)?h:"object"==typeof h&&"number"==typeof h.length?[...h]:[h]),this.options={},"function"==typeof e?o=e:Object.assign(this.options,e),o&&this.on("always",o),this.getImages(),i&&(this.jqDeferred=new i.Deferred),setTimeout(this.check.bind(this))):s.error(`Bad element for imagesLoaded ${r||t}`)}n.prototype=Object.create(e.prototype),n.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)};const o=[1,9,11];n.prototype.addElementImages=function(t){"IMG"===t.nodeName&&this.addImage(t),!0===this.options.background&&this.addElementBackgroundImages(t);let{nodeType:e}=t;if(!e||!o.includes(e))return;let i=t.querySelectorAll("img");for(let t of i)this.addImage(t);if("string"==typeof this.options.background){let e=t.querySelectorAll(this.options.background);for(let t of e)this.addElementBackgroundImages(t)}};const r=/url\((['"])?(.*?)\1\)/gi;function h(t){this.img=t}function d(t,e){this.url=t,this.element=e,this.img=new Image}return n.prototype.addElementBackgroundImages=function(t){let e=getComputedStyle(t);if(!e)return;let i=r.exec(e.backgroundImage);for(;null!==i;){let s=i&&i[2];s&&this.addBackground(s,t),i=r.exec(e.backgroundImage)}},n.prototype.addImage=function(t){let e=new h(t);this.images.push(e)},n.prototype.addBackground=function(t,e){let i=new d(t,e);this.images.push(i)},n.prototype.check=function(){if(this.progressedCount=0,this.hasAnyBroken=!1,!this.images.length)return void this.complete();let t=(t,e,i)=>{setTimeout((()=>{this.progress(t,e,i)}))};this.images.forEach((function(e){e.once("progress",t),e.check()}))},n.prototype.progress=function(t,e,i){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!t.isLoaded,this.emitEvent("progress",[this,t,e]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,t),this.progressedCount===this.images.length&&this.complete(),this.options.debug&&s&&s.log(`progress: ${i}`,t,e)},n.prototype.complete=function(){let t=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(t,[this]),this.emitEvent("always",[this]),this.jqDeferred){let t=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[t](this)}},h.prototype=Object.create(e.prototype),h.prototype.check=function(){this.getIsImageComplete()?this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.img.crossOrigin&&(this.proxyImage.crossOrigin=this.img.crossOrigin),this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.proxyImage.src=this.img.currentSrc||this.img.src)},h.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},h.prototype.confirm=function(t,e){this.isLoaded=t;let{parentNode:i}=this.img,s="PICTURE"===i.nodeName?i:this.img;this.emitEvent("progress",[this,s,e])},h.prototype.handleEvent=function(t){let e="on"+t.type;this[e]&&this[e](t)},h.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},h.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},h.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},d.prototype=Object.create(h.prototype),d.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url,this.getIsImageComplete()&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},d.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},d.prototype.confirm=function(t,e){this.isLoaded=t,this.emitEvent("progress",[this,this.element,e])},n.makeJQueryPlugin=function(e){(e=e||t.jQuery)&&(i=e,i.fn.imagesLoaded=function(t,e){return new n(this,t,e).jqDeferred.promise(i(this))})},n.makeJQueryPlugin(),n}));
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,390 @@
|
||||
jQuery(document).ready(function( $ ){
|
||||
|
||||
//Add landmark roles
|
||||
$('.elementor-location-header').attr('role', 'banner');
|
||||
$('.elementor-location-footer').attr('role', 'contentinfo');
|
||||
$('div[data-elementor-type=wp-page], div[data-elementor-type=wp-post], div[data-elementor-type=archive], div[data-elementor-type=single-post], div[data-elementor-type=error-404], div.pass-protected').attr('role', 'main').attr('id', 'main-content').attr('tabindex','-1');
|
||||
|
||||
$("#skiplink").click(function() {
|
||||
$('#main-content').focus();
|
||||
});
|
||||
|
||||
|
||||
// close mega menu when tabbing through a flyout and out onto the top level nav items
|
||||
jQuery(function($) {
|
||||
$('.mega-sub-menu').on('focusout', function(e) {
|
||||
e.preventDefault();
|
||||
if (!$(this).has(event.relatedTarget).length && !$(this).is(event.relatedTarget)) {
|
||||
// Focus has moved outside the menu, so close it
|
||||
$('.max-mega-menu').data('maxmegamenu').hideAllPanels();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// make svg invisible to SR
|
||||
$('.elementor-icon-list-icon svg, svg.e-font-icon-svg').attr('role','presentation').attr('tabindex','-1');
|
||||
|
||||
// Add aria-labels to roles
|
||||
$('.utility nav').attr('aria-label', 'Utility');
|
||||
$('.mainNav nav').attr('aria-label', 'Global');
|
||||
$('.footer nav').attr('aria-label', 'Footer');
|
||||
|
||||
// Add title text for Read More links for posts
|
||||
$('.news .jet-listing-grid__item').each(function () {
|
||||
var title = $('.title .elementor-heading-title a', this).html();
|
||||
var viewDetails = $('.link a', this);
|
||||
$(viewDetails).append('<span class="visuallyhidden"> about ' +title+ '</span>');
|
||||
});
|
||||
|
||||
// Add title text for Read More links
|
||||
$('.hidden-text .elementor-column').each(function () {
|
||||
var title = $('.title .elementor-heading-title', this).html();
|
||||
var viewDetails = $('.link a', this);
|
||||
$(viewDetails).append('<span class="visuallyhidden"> for ' +title+ '</span>');
|
||||
});
|
||||
|
||||
// Remove role Button
|
||||
$('.elementor-button-link').removeAttr('role', 'button');
|
||||
|
||||
|
||||
// Announcer
|
||||
//Move Banner Top to below skip link in the DOM
|
||||
var banner = $(".ancr-group.ancr-pos-top")
|
||||
$(banner).insertAfter('.elementor-location-header #skiplink');
|
||||
//Move bottom Banners to footer in the DOM
|
||||
var bannerBottom = $(".ancr-group.ancr-pos-bottom")
|
||||
$("div[data-elementor-type=footer]").prepend(bannerBottom);
|
||||
//Move Banner close button in the DOM
|
||||
$('.ancr-wrap').each(function() {
|
||||
var $this = $(this),
|
||||
$closeBtn = $this.find('.ancr-close-btn'),
|
||||
$target = $this.find('.ancr-content');
|
||||
$target.append($closeBtn);
|
||||
});
|
||||
|
||||
// Accordion accessibility (New)
|
||||
$('div.e-n-accordion').removeAttr('aria-label');
|
||||
$('details div').removeAttr('role').removeAttr('aria-labelledby');
|
||||
$('details summary').removeAttr('tabindex');
|
||||
|
||||
// Add id and for to News/Blog Search
|
||||
$(".search .jet-filter-label").replaceWith(function(){
|
||||
$(this).attr('for', 'search');
|
||||
return this.outerHTML.replace("<div", "<label").replace("</div", "</label")
|
||||
});
|
||||
$('.search .jet-search-filter__input').attr('id', 'search');
|
||||
|
||||
// Add aria-label to Search button
|
||||
$('.search .jet-search-filter__submit').attr('aria-label', 'Search')
|
||||
|
||||
|
||||
// Click enter in input field to click button search for redirect jetsmartfilter
|
||||
$( document ).ready(function() {
|
||||
$('.jet-search-filter__input').keyup(function(event) {
|
||||
if (event.which === 13) {
|
||||
$(this).parents(".elementor-widget-jet-smart-filters-search").siblings().find(".apply-filters__button").click()
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
// Add keyboard access to pagination
|
||||
$( document ).ready(function() {
|
||||
$('.jet-filters-pagination__link').attr('tabindex', 0);
|
||||
$('.jet-filters-pagination__item').removeAttr('tabindex');
|
||||
|
||||
$('.jet-filters-pagination__link').keyup(function(event) {
|
||||
if (event.which === 13) {
|
||||
$(this).click();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
// Aria for Checkbox Filters
|
||||
$( document ).ready(function() {
|
||||
$('.filter.multi .jet-filters-group .jet-filter').each(function (i) {
|
||||
var identifier = 0 + i;
|
||||
var group = $(this);
|
||||
var label = $('.jet-filter-label', this);
|
||||
$(group).attr('role', 'group').attr('aria-labelledby', 'filter-heading' + identifier)
|
||||
$(label).attr('id', 'filter-heading' + identifier)
|
||||
});
|
||||
|
||||
|
||||
$('.filter:not(.multi) .jet-filter').attr('role', 'group').attr('aria-labelledby', 'filter-heading');
|
||||
|
||||
$('.filter:not(.multi) .jet-filter-label').attr('id', 'filter-heading');
|
||||
|
||||
$('.filter .jet-checkboxes-list__input, .filter .jet-radio-list__input').attr('aria-checked', 'false');
|
||||
|
||||
$('.filter .jet-checkboxes-list__input, .filter .jet-radio-list__input').click(function() {
|
||||
if ($(this).attr('aria-checked') == "false") {
|
||||
$(this).attr("aria-checked","true");
|
||||
}
|
||||
else {
|
||||
$(this).attr("aria-checked", "false");
|
||||
}
|
||||
});
|
||||
|
||||
$('.filter .jet-checkboxes-list__input, .filter .jet-radio-list__input').keyup(function(event) {
|
||||
if (event.which === 13) {
|
||||
$(this).click();
|
||||
}
|
||||
});
|
||||
|
||||
$('.filter .jet-filter-row').each(function (i) {
|
||||
var identifier = 0 + i;
|
||||
var label = $('.jet-checkboxes-list__item, .jet-radio-list__input', this);
|
||||
var checkbox = $('.jet-checkboxes-list__input, .jet-radio-list__input', this);
|
||||
$(label).attr('for', 'checkbox' + identifier)
|
||||
$(checkbox).attr('id', 'checkbox' + identifier)
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
// Keyboard navigtion for Active filters
|
||||
// Need to add a mutation observer to look for changes
|
||||
// when filter is selected. .jet-active-filter is not
|
||||
// in the DOM on page load only after filter selection
|
||||
var targetNodes = $(".jet-active-filters");
|
||||
var MutationObserver = window.MutationObserver || window.WebKitMutationObserver;
|
||||
var myObserver = new MutationObserver(mutationHandler);
|
||||
var obsConfig = {
|
||||
childList: true,
|
||||
characterData: true,
|
||||
attributes: true,
|
||||
subtree: true
|
||||
};
|
||||
|
||||
//--- Add a target node to the observer. Can only add one node at a time.
|
||||
targetNodes.each(function() {
|
||||
myObserver.observe(this, obsConfig);
|
||||
});
|
||||
|
||||
function mutationHandler(mutationRecords) {
|
||||
mutationRecords.forEach(function(mutation) {
|
||||
if (typeof mutation.removedNodes == "object") {
|
||||
var jq = $(mutation.removedNodes);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
setTimeout(function() {
|
||||
$('.jet-active-filter').attr('tabindex', 0);
|
||||
$('.jet-active-filter').keyup(function(event) {
|
||||
if (event.which === 13) {
|
||||
$(this).click();
|
||||
}
|
||||
});
|
||||
},1000)
|
||||
// End mutation observer
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
$("#checkboxes, #radio").replaceWith(function(){
|
||||
return this.outerHTML.replace("<span", "<fieldset").replace("</span", "</fieldset")
|
||||
});
|
||||
});
|
||||
|
||||
var selected = [];
|
||||
$('input[type=checkbox], input[type=radio]').each(function() {
|
||||
var value = $(this).val();
|
||||
var name = $(this).attr('name').replace(/ /g,'').replace(/[^a-z0-9\s]/gi, '');
|
||||
var id = value.replace(/ /g,'').replace(/[^a-z0-9\s]/gi, '');
|
||||
$(this).attr({ id: $(this).attr("id") + ' ' +id });
|
||||
var newId = $(this).attr('id');
|
||||
$(this).siblings('label').attr('for', newId);
|
||||
|
||||
});
|
||||
|
||||
// Refreshes carousels inside tab widgets
|
||||
var refreshSliders = function(){
|
||||
jQuery( ".swiper-container" ).each(function( index ) {
|
||||
swiperInstance = jQuery(this).data('swiper');
|
||||
swiperInstance.params.observer = true;
|
||||
swiperInstance.params.observeParents = true;
|
||||
swiperInstance.update();
|
||||
});
|
||||
}
|
||||
window.onload = function() {
|
||||
jQuery(".elementor-tab-title").on("click", function(){
|
||||
var $this = jQuery(this);
|
||||
refreshSliders();
|
||||
jQuery('html,body').animate({
|
||||
scrollTop: $this.offset().top - 220
|
||||
}, 500);
|
||||
});
|
||||
}
|
||||
// Carousel refresh inside tab widgets
|
||||
|
||||
//Update Tabbing of Tabs
|
||||
|
||||
$(function($) {
|
||||
$('.elementor-tabs .elementor-tab-title a').replaceWith(function(){
|
||||
$(this).removeAttr('href');
|
||||
return this.outerHTML.replace("<a", "<h3").replace("</a", "</h3")
|
||||
});
|
||||
});
|
||||
|
||||
$('.elementor-tabs .elementor-tab-title').attr('tabindex', 0);
|
||||
$('.elementor-tabs .elementor-tab-content').attr('tabindex', -1);
|
||||
|
||||
if ($(window).width() < 500) {
|
||||
|
||||
// Close Tab widget on mobile on page load
|
||||
const delay = 10;
|
||||
setTimeout(function() {
|
||||
$('.elementor-tab-title').removeClass('elementor-active');
|
||||
$('.elementor-tab-content').css('display', 'none');
|
||||
}, delay);
|
||||
}
|
||||
|
||||
// Anchor scroll offset top
|
||||
$('a[href*="#"]:not([href="#"])').click(function() {
|
||||
var offset = -200; // <-- change the value here
|
||||
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
|
||||
var target = $(this.hash);
|
||||
target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
|
||||
if (target.length) {
|
||||
$('html, body').animate({
|
||||
scrollTop: target.offset().top + offset
|
||||
}, 300);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Hide and Show header search form
|
||||
$('.openSearch').click(function(e) {
|
||||
e.preventDefault();
|
||||
$('.closeSearch, #searchForm').removeClass("hide");
|
||||
$('.openSearch, .util-nav').addClass("hide");
|
||||
setTimeout(function() {
|
||||
$('#search-59bc91d').focus();
|
||||
}, 100);
|
||||
});
|
||||
$('.closeSearch').click(function(e) {
|
||||
e.preventDefault();
|
||||
$('.closeSearch, #searchForm').addClass("hide");
|
||||
$('.openSearch, .uti-nav').removeClass("hide");
|
||||
setTimeout(function() {
|
||||
$('.openSearch a').focus();
|
||||
}, 100);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
/* Code from https://element.how/elementor-tabs-closed-by-default/
|
||||
* Copyright 2024 Element.How
|
||||
* Automatically close the tabs on page load for mobile devices
|
||||
*/
|
||||
window.addEventListener('load', function () {
|
||||
if (window.innerWidth > 767) return;
|
||||
setTimeout(function () {
|
||||
let tabsElems = document.querySelectorAll('.e-n-tabs')
|
||||
tabsElems.forEach(e => {
|
||||
let activeTitles = e.querySelectorAll('.e-n-tab-title[aria-selected="true"]');
|
||||
let activeContent = e.querySelector('.e-con.e-active')
|
||||
activeContent.style.display = 'none';
|
||||
activeContent.classList.remove('e-active');
|
||||
activeTitles.forEach(activeTitle => activeTitle.setAttribute('aria-selected', false));
|
||||
activeTitles.forEach(activeTitle => activeTitle.setAttribute('tabindex', -1));
|
||||
});
|
||||
}, 300);
|
||||
});
|
||||
|
||||
/* Code from https://element.how/elementor-tabs-closed-by-default/
|
||||
* Copyright 2024 Element.How
|
||||
* Make the Elementor tabs closable
|
||||
*/
|
||||
(function () {
|
||||
if (window.innerWidth > 767) return;
|
||||
let isOnPageLoad = true;
|
||||
window.addEventListener('load', () => {
|
||||
setTimeout(() => {
|
||||
isOnPageLoad = false;
|
||||
}, 600);
|
||||
});
|
||||
if (document.querySelector('.elementor-editor-active')) return;
|
||||
document.querySelectorAll('.e-n-tab-title').forEach(tabTitle => {
|
||||
tabTitle.addEventListener('click', function () {
|
||||
if (isOnPageLoad) return;
|
||||
if (this.getAttribute('aria-selected') === 'true') {
|
||||
setTimeout(() => {
|
||||
const tabId = this.getAttribute('aria-controls');
|
||||
const tabContent = document.getElementById(tabId);
|
||||
if (tabContent) {
|
||||
tabContent.style.display = 'none';
|
||||
tabContent.classList.remove('e-active');
|
||||
}
|
||||
this.setAttribute('aria-selected', 'false');
|
||||
}, 30);
|
||||
}
|
||||
});
|
||||
});
|
||||
}());
|
||||
|
||||
|
||||
|
||||
/* Control the Elementor Tabs from the URL
|
||||
* Code from https://element.how/elementor-open-specific-tab-toggle-accordion/
|
||||
* Copyright 2023 Element.how
|
||||
* Updated 2023/12/05
|
||||
*/
|
||||
window.addEventListener('load', () => {
|
||||
setTimeout(function () {
|
||||
|
||||
let scrollOffset = 200; /* scroll offset from the top of title */
|
||||
|
||||
const tabsAccordionToggleTitles = document.querySelectorAll('.e-n-accordion-item-title, .e-n-tab-title, .elementor-tab-title');
|
||||
|
||||
const clickTitleWithAnchor = (anchor) => {
|
||||
tabsAccordionToggleTitles.forEach(title => {
|
||||
if (title.querySelector(`#${anchor}`) != null || title.id === anchor || (title.closest('details') && title.closest('details').id === anchor)) {
|
||||
if (title.getAttribute('aria-expanded') !== 'true' && !title.classList.contains('elementor-active')) title.click();
|
||||
let timing = 0;
|
||||
let scrollTarget = title;
|
||||
if (getComputedStyle(title.closest('.elementor-element')).getPropertyValue('--n-tabs-direction') == 'row') scrollTarget = title.closest('.elementor-element');
|
||||
if (title.closest('.e-n-accordion, .elementor-accordion-item, .elementor-toggle-item')) {
|
||||
timing = 400;
|
||||
}
|
||||
setTimeout(function () {
|
||||
jQuery('html, body').animate({
|
||||
scrollTop: jQuery(scrollTarget).offset().top - scrollOffset,
|
||||
}, 'slow');
|
||||
}, timing);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
document.addEventListener('click', (event) => {
|
||||
if (event.target.closest('a') && event.target.closest('a').href.includes('#')) {
|
||||
const anchor = extractAnchor(event.target.closest('a').href);
|
||||
if (anchor && isAnchorInTitles(anchor, tabsAccordionToggleTitles)) {
|
||||
event.preventDefault();
|
||||
clickTitleWithAnchor(anchor);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
const currentAnchor = extractAnchor(window.location.href);
|
||||
if (currentAnchor) {
|
||||
clickTitleWithAnchor(currentAnchor);
|
||||
}
|
||||
|
||||
function extractAnchor(url) {
|
||||
const match = url.match(/#([^?]+)/);
|
||||
return match ? match[1] : null;
|
||||
};
|
||||
|
||||
function isAnchorInTitles(anchor, titles) {
|
||||
return Array.from(titles).some(title => {
|
||||
return title.querySelector(`#${anchor}`) !== null || title.id === anchor || (title.closest('details') && title.closest('details').id === anchor);
|
||||
});
|
||||
};
|
||||
|
||||
}, 300);
|
||||
});
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying the footer.
|
||||
*
|
||||
* Contains the body & html closing tags.
|
||||
*
|
||||
* @package HelloElementor
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'elementor_theme_do_location' ) || ! elementor_theme_do_location( 'footer' ) ) {
|
||||
get_template_part( 'template-parts/footer' );
|
||||
}
|
||||
?>
|
||||
|
||||
<?php wp_footer(); ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,225 @@
|
||||
<?php
|
||||
/*This file is part of HelloChildTheme*/
|
||||
/*Load the parent stylesheet then child theme stylesheet*/
|
||||
if ( ! function_exists( 'suffice_child_enqueue_child_styles' ) ) {
|
||||
function HelloChildTheme_enqueue_child_styles() {
|
||||
// loading parent style
|
||||
// wp_register_style('parente2-style',get_template_directory_uri() . '/style.css', array(), rand(111,9999),'all');
|
||||
|
||||
// wp_enqueue_style( 'parente2-style' );
|
||||
|
||||
// loading child style
|
||||
wp_register_style('childe2-style',get_stylesheet_directory_uri() . '/style.css', array(), rand(111,9999),'all');
|
||||
|
||||
wp_enqueue_style( 'childe2-style');
|
||||
}
|
||||
}
|
||||
add_action( 'wp_enqueue_scripts', 'HelloChildTheme_enqueue_child_styles' );
|
||||
|
||||
|
||||
// Add custom JS scripts
|
||||
function myprefix_enqueue_scripts() {
|
||||
wp_enqueue_script( 'scripts', get_stylesheet_directory_uri() . '/assets/js/scripts.js', array('jquery'), rand(111,9999), true );
|
||||
}
|
||||
add_action( 'wp_enqueue_scripts', 'myprefix_enqueue_scripts' );
|
||||
|
||||
|
||||
// Change WP Login screen error message
|
||||
add_filter( 'login_errors', function( $error ) {
|
||||
global $errors;
|
||||
$err_codes = $errors->get_error_codes();
|
||||
|
||||
// Invalid username.
|
||||
// Default: '<strong>ERROR</strong>: Invalid username. <a href="%s">Lost your password</a>?'
|
||||
if ( in_array( 'invalid_username', $err_codes ) ) {
|
||||
$error = '<strong>ERROR</strong>: Wrong information.';
|
||||
}
|
||||
|
||||
// Invalid email.
|
||||
if ( in_array( 'invalid_email', $err_codes ) ) {
|
||||
$error = '<strong>ERROR</strong>: Wrong information.';
|
||||
}
|
||||
|
||||
// Incorrect password.
|
||||
// Default: '<strong>ERROR</strong>: The password you entered for the username <strong>%1$s</strong> is incorrect. <a href="%2$s">Lost your password</a>?'
|
||||
if ( in_array( 'incorrect_password', $err_codes ) ) {
|
||||
$error = '<strong>ERROR</strong>: Wrong information.';
|
||||
}
|
||||
|
||||
return $error;
|
||||
} );
|
||||
|
||||
|
||||
add_action('admin_init', function () {
|
||||
// Redirect any user trying to access comments page
|
||||
global $pagenow;
|
||||
|
||||
if ($pagenow === 'edit-comments.php') {
|
||||
wp_safe_redirect(admin_url());
|
||||
exit;
|
||||
}
|
||||
|
||||
// Remove comments metabox from dashboard
|
||||
remove_meta_box('dashboard_recent_comments', 'dashboard', 'normal');
|
||||
|
||||
// Disable support for comments and trackbacks in post types
|
||||
foreach (get_post_types() as $post_type) {
|
||||
if (post_type_supports($post_type, 'comments')) {
|
||||
remove_post_type_support($post_type, 'comments');
|
||||
remove_post_type_support($post_type, 'trackbacks');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Close comments on the front-end
|
||||
add_filter('comments_open', '__return_false', 20, 2);
|
||||
add_filter('pings_open', '__return_false', 20, 2);
|
||||
|
||||
// Hide existing comments
|
||||
add_filter('comments_array', '__return_empty_array', 10, 2);
|
||||
|
||||
// Remove comments page in menu
|
||||
add_action('admin_menu', function () {
|
||||
remove_menu_page('edit-comments.php');
|
||||
});
|
||||
|
||||
// Remove comments links from admin bar
|
||||
function my_admin_bar_render() {
|
||||
global $wp_admin_bar;
|
||||
$wp_admin_bar->remove_menu('comments');
|
||||
}
|
||||
add_action( 'wp_before_admin_bar_render', 'my_admin_bar_render' );
|
||||
|
||||
|
||||
// Move Yoast to Bottom of Edit Screen
|
||||
add_filter( 'wpseo_metabox_prio', function() { return 'low'; } );
|
||||
|
||||
|
||||
// Remove jQuery Migrate
|
||||
// function remove_jquery_migrate($scripts)
|
||||
// {
|
||||
// if (!is_admin() && isset($scripts->registered['jquery'])) {
|
||||
// $script = $scripts->registered['jquery'];
|
||||
|
||||
// if ($script->deps) { // Check whether the script has any dependencies
|
||||
// $script->deps = array_diff($script->deps, array(
|
||||
// 'jquery-migrate'
|
||||
// ));
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// add_action('wp_default_scripts', 'remove_jquery_migrate');
|
||||
|
||||
|
||||
/**
|
||||
* Disable the emoji's
|
||||
*/
|
||||
function disable_emojis() {
|
||||
remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
|
||||
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
|
||||
remove_action( 'wp_print_styles', 'print_emoji_styles' );
|
||||
remove_action( 'admin_print_styles', 'print_emoji_styles' );
|
||||
remove_filter( 'the_content_feed', 'wp_staticize_emoji' );
|
||||
remove_filter( 'comment_text_rss', 'wp_staticize_emoji' );
|
||||
remove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' );
|
||||
add_filter( 'tiny_mce_plugins', 'disable_emojis_tinymce' );
|
||||
add_filter( 'wp_resource_hints', 'disable_emojis_remove_dns_prefetch', 10, 2 );
|
||||
}
|
||||
add_action( 'init', 'disable_emojis' );
|
||||
|
||||
/**
|
||||
* Filter function used to remove the tinymce emoji plugin.
|
||||
*
|
||||
* @param array $plugins
|
||||
* @return array Difference betwen the two arrays
|
||||
*/
|
||||
function disable_emojis_tinymce( $plugins ) {
|
||||
if ( is_array( $plugins ) ) {
|
||||
return array_diff( $plugins, array( 'wpemoji' ) );
|
||||
} else {
|
||||
return array();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove emoji CDN hostname from DNS prefetching hints.
|
||||
*
|
||||
* @param array $urls URLs to print for resource hints.
|
||||
* @param string $relation_type The relation type the URLs are printed for.
|
||||
* @return array Difference betwen the two arrays.
|
||||
*/
|
||||
function disable_emojis_remove_dns_prefetch( $urls, $relation_type ) {
|
||||
if ( 'dns-prefetch' == $relation_type ) {
|
||||
/** This filter is documented in wp-includes/formatting.php */
|
||||
$emoji_svg_url = apply_filters( 'emoji_svg_url', 'https://s.w.org/images/core/emoji/2/svg/' );
|
||||
|
||||
$urls = array_diff( $urls, array( $emoji_svg_url ) );
|
||||
}
|
||||
|
||||
return $urls;
|
||||
}
|
||||
|
||||
|
||||
// Disable dashicon
|
||||
// function remove_dashicons_wordpress() {
|
||||
// if ( ! is_user_logged_in() ) {
|
||||
// wp_dequeue_style('dashicons');
|
||||
// wp_deregister_style( 'dashicons' );
|
||||
// }
|
||||
// }
|
||||
// add_action( 'wp_enqueue_scripts', 'remove_dashicons_wordpress' );
|
||||
|
||||
|
||||
// Deactivate Eicons in Elementor
|
||||
add_action( 'wp_enqueue_scripts', 'js_remove_default_stylesheet', 20 );
|
||||
function js_remove_default_stylesheet() {
|
||||
|
||||
// Don't remove it in the backend
|
||||
if ( is_admin() || current_user_can( 'manage_options' ) ) {
|
||||
return;
|
||||
}
|
||||
wp_deregister_style( 'elementor-icons' );
|
||||
}
|
||||
|
||||
|
||||
// Disable WP Embed
|
||||
function remove_wp_embed(){
|
||||
wp_dequeue_script( 'wp-embed' );
|
||||
}
|
||||
add_action( 'wp_footer', 'remove_wp_embed' );
|
||||
|
||||
|
||||
// Change gravity form error message from h2 to span
|
||||
add_filter( 'gform_validation_message', 'change_message', 10, 2 );
|
||||
function change_message( $message, $form ) {
|
||||
return "<span>There was a problem with your submission. Please review the fields below.</span>";
|
||||
}
|
||||
// Change gravity form required legend text
|
||||
add_filter( 'gform_required_legend', function( $legend, $form ) {
|
||||
return 'An asterisk (*) indicates a required field.';
|
||||
}, 10, 2 );
|
||||
// force AJAX on all GForms
|
||||
add_filter( 'gform_form_args', 'setup_form_args' );
|
||||
function setup_form_args( $form_args ) {
|
||||
$form_args['ajax'] = true;
|
||||
return $form_args;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// This code snippet will programmatically replace the URLs returned by get_permalink(),
|
||||
// this updates the HTML to point to the external URL instead of relying only on a redirect.T
|
||||
function pm_use_external_redirects_as_canonical_urls( $permalink, $post ) {
|
||||
global $permalink_manager_external_redirects;
|
||||
|
||||
$post = ( is_integer( $post ) ) ? get_post( $post ) : $post;
|
||||
|
||||
if ( !empty( $permalink_manager_external_redirects[ $post->ID ] ) ) {
|
||||
$permalink = $permalink_manager_external_redirects[ $post->ID ];
|
||||
}
|
||||
|
||||
return $permalink;
|
||||
}
|
||||
add_filter( 'permalink_manager_filter_final_post_permalink', 'pm_use_external_redirects_as_canonical_urls', 10, 2 );
|
||||
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying the header
|
||||
*
|
||||
* This is the template that displays all of the <head> section, opens the <body> tag and adds the site's header.
|
||||
*
|
||||
* @package HelloElementor
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
?>
|
||||
<!doctype html>
|
||||
<html <?php language_attributes(); ?>>
|
||||
<head>
|
||||
<meta charset="<?php bloginfo( 'charset' ); ?>">
|
||||
<?php $viewport_content = apply_filters( 'hello_elementor_viewport_content', 'width=device-width, initial-scale=1' ); ?>
|
||||
<meta name="viewport" content="<?php echo esc_attr( $viewport_content ); ?>">
|
||||
<link rel="profile" href="http://gmpg.org/xfn/11">
|
||||
<meta name="format-detection" content="telephone=no">
|
||||
<?php wp_head(); ?>
|
||||
</head>
|
||||
<body <?php body_class(); ?>>
|
||||
<?php if ( function_exists( 'gtm4wp_the_gtm_tag' ) ) { gtm4wp_the_gtm_tag(); } ?>
|
||||
<?php
|
||||
hello_elementor_body_open();
|
||||
|
||||
if ( ! function_exists( 'elementor_theme_do_location' ) || ! elementor_theme_do_location( 'header' ) ) {
|
||||
if ( did_action( 'elementor/loaded' ) && hello_header_footer_experiment_active() ) {
|
||||
get_template_part( 'template-parts/dynamic-header' );
|
||||
} else {
|
||||
get_template_part( 'template-parts/header' );
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 38 KiB |
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
Theme Name: Hello Getfused
|
||||
Description: Standard template for sites built by Getfused using Elementor.
|
||||
Author: Getfused
|
||||
Author URL: https://getfused.com
|
||||
Template: hello-elementor
|
||||
Version: 1.0
|
||||
License: GNU General Public License v2 or later
|
||||
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
Text Domain: HelloGetfused
|
||||
*/
|
||||
[id] {
|
||||
scroll-margin-top: 150px; /* Adjust this to your header's height */
|
||||
}
|
||||
|
||||
.grecaptcha-badge {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
#wp-admin-bar-wpseo-menu,
|
||||
#wp-admin-bar-gform-forms,
|
||||
#wp-admin-bar-updates,
|
||||
#wp-admin-bar-new-content,
|
||||
#wp-admin-bar-wpengine_adminbar,
|
||||
#wp-admin-bar-wp-mail-smtp-menu,
|
||||
#wp-admin-bar-elementor_notes,
|
||||
#wp-admin-bar-stats,
|
||||
#wp-admin-bar-customize {
|
||||
display: none!important;
|
||||
}
|
||||
|
||||
/* Show wider Edit with Elementor flyout */
|
||||
#wpadminbar .quicklinks #wp-admin-bar-elementor_edit_page.menupop.hover ul li .ab-item {
|
||||
width: auto !important;
|
||||
max-width: 280px;
|
||||
}
|
||||
|
||||
#wpadminbar .quicklinks #wp-admin-bar-elementor_edit_page.menupop.hover ul li .ab-item .elementor-edit-link-title {
|
||||
margin-right: 10px;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying 404 pages (not found).
|
||||
*
|
||||
* @package HelloElementor
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
?>
|
||||
<main class="site-main" role="main">
|
||||
<?php if ( apply_filters( 'hello_elementor_page_title', true ) ) : ?>
|
||||
<header class="page-header">
|
||||
<h1 class="entry-title"><?php esc_html_e( 'The page can’t be found.', 'hello-elementor' ); ?></h1>
|
||||
</header>
|
||||
<?php endif; ?>
|
||||
<div class="page-content">
|
||||
<p><?php esc_html_e( 'It looks like nothing was found at this location.', 'hello-elementor' ); ?></p>
|
||||
</div>
|
||||
|
||||
</main>
|
||||
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying archive pages.
|
||||
*
|
||||
* @package HelloElementor
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
?>
|
||||
<main class="site-main" role="main">
|
||||
|
||||
<?php if ( apply_filters( 'hello_elementor_page_title', true ) ) : ?>
|
||||
<header class="page-header">
|
||||
<?php
|
||||
the_archive_title( '<h1 class="entry-title">', '</h1>' );
|
||||
the_archive_description( '<p class="archive-description">', '</p>' );
|
||||
?>
|
||||
</header>
|
||||
<?php endif; ?>
|
||||
<div class="page-content">
|
||||
<?php
|
||||
while ( have_posts() ) {
|
||||
the_post();
|
||||
$post_link = get_permalink();
|
||||
?>
|
||||
<article class="post">
|
||||
<?php
|
||||
printf( '<h2 class="%s"><a href="%s">%s</a></h2>', 'entry-title', esc_url( $post_link ), esc_html( get_the_title() ) );
|
||||
printf( '<a href="%s">%s</a>', esc_url( $post_link ), get_the_post_thumbnail( $post, 'large' ) );
|
||||
the_excerpt();
|
||||
?>
|
||||
</article>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<?php wp_link_pages(); ?>
|
||||
|
||||
<?php
|
||||
global $wp_query;
|
||||
if ( $wp_query->max_num_pages > 1 ) :
|
||||
?>
|
||||
<nav class="pagination" role="navigation">
|
||||
<?php /* Translators: HTML arrow */ ?>
|
||||
<div class="nav-previous"><?php next_posts_link( sprintf( __( '%s older', 'hello-elementor' ), '<span class="meta-nav">←</span>' ) ); ?></div>
|
||||
<?php /* Translators: HTML arrow */ ?>
|
||||
<div class="nav-next"><?php previous_posts_link( sprintf( __( 'newer %s', 'hello-elementor' ), '<span class="meta-nav">→</span>' ) ); ?></div>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
</main>
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying footer.
|
||||
*
|
||||
* @package HelloElementor
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
?>
|
||||
<footer id="site-footer" class="site-footer" role="contentinfo">
|
||||
<?php // footer. ?>
|
||||
</footer>
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying header.
|
||||
*
|
||||
* @package HelloElementor
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
$site_name = get_bloginfo( 'name' );
|
||||
$tagline = get_bloginfo( 'description', 'display' );
|
||||
?>
|
||||
<header class="site-header" role="banner">
|
||||
|
||||
<div class="site-branding">
|
||||
<?php
|
||||
if ( has_custom_logo() ) {
|
||||
the_custom_logo();
|
||||
} elseif ( $site_name ) {
|
||||
?>
|
||||
<h1 class="site-title">
|
||||
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php esc_attr_e( 'Home', 'hello-elementor' ); ?>" rel="home">
|
||||
<?php echo esc_html( $site_name ); ?>
|
||||
</a>
|
||||
</h1>
|
||||
<p class="site-description">
|
||||
<?php
|
||||
if ( $tagline ) {
|
||||
echo esc_html( $tagline );
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<?php if ( has_nav_menu( 'menu-1' ) ) : ?>
|
||||
<nav class="site-navigation" role="navigation">
|
||||
<?php wp_nav_menu( array( 'theme_location' => 'menu-1' ) ); ?>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
</header>
|
||||
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying search results.
|
||||
*
|
||||
* @package HelloElementor
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
?>
|
||||
<main class="site-main" role="main">
|
||||
<?php if ( apply_filters( 'hello_elementor_page_title', true ) ) : ?>
|
||||
<header class="page-header">
|
||||
<h1 class="entry-title">
|
||||
<?php esc_html_e( 'Search results for: ', 'hello-elementor' ); ?>
|
||||
<span><?php echo get_search_query(); ?></span>
|
||||
</h1>
|
||||
</header>
|
||||
<?php endif; ?>
|
||||
<div class="page-content">
|
||||
<?php if ( have_posts() ) : ?>
|
||||
<?php
|
||||
while ( have_posts() ) :
|
||||
the_post();
|
||||
printf( '<h2><a href="%s">%s</a></h2>', esc_url( get_permalink() ), esc_html( get_the_title() ) );
|
||||
the_post_thumbnail();
|
||||
the_excerpt();
|
||||
endwhile;
|
||||
?>
|
||||
<?php else : ?>
|
||||
<p><?php esc_html_e( 'It seems we can\'t find what you\'re looking for.', 'hello-elementor' ); ?></p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<?php wp_link_pages(); ?>
|
||||
|
||||
<?php
|
||||
global $wp_query;
|
||||
if ( $wp_query->max_num_pages > 1 ) :
|
||||
?>
|
||||
<nav class="pagination" role="navigation">
|
||||
<?php /* Translators: HTML arrow */ ?>
|
||||
<div class="nav-previous"><?php next_posts_link( sprintf( __( '%s older', 'hello-elementor' ), '<span class="meta-nav">←</span>' ) ); ?></div>
|
||||
<?php /* Translators: HTML arrow */ ?>
|
||||
<div class="nav-next"><?php previous_posts_link( sprintf( __( 'newer %s', 'hello-elementor' ), '<span class="meta-nav">→</span>' ) ); ?></div>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
</main>
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying singular post-types: posts, pages and user-defined custom post types.
|
||||
*
|
||||
* @package HelloElementor
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly.
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
while ( have_posts() ) : the_post();
|
||||
?>
|
||||
|
||||
<main <?php post_class( 'site-main' ); ?> role="main">
|
||||
<?php if ( apply_filters( 'hello_elementor_page_title', true ) ) : ?>
|
||||
<header class="page-header">
|
||||
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
|
||||
</header>
|
||||
<?php endif; ?>
|
||||
<div class="page-content">
|
||||
<?php the_content(); ?>
|
||||
<div class="post-tags">
|
||||
<?php the_tags( '<span class="tag-links">' . __( 'Tagged ', 'hello-elementor' ), null, '</span>' ); ?>
|
||||
</div>
|
||||
<?php wp_link_pages(); ?>
|
||||
</div>
|
||||
|
||||
<?php comments_template(); ?>
|
||||
</main>
|
||||
|
||||
<?php
|
||||
endwhile;
|
||||
Reference in New Issue
Block a user