This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="accordion__section col-span-12 lg:col-span-6"> | |
<button tabindex="0" id="accordion__toggle4" class="accordion__toggle"> | |
<span class="accordion__icon"> | |
<span class="accordion__open">+</span> | |
<span class="accordion__close">-</span> | |
</span> | |
<span class="accordion__title">Test Title 4</span> | |
</button> | |
<div class="accordion__panel" aria-expanded="false" | |
aria-labelledby="accordion__toggle4"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var acc = document.getElementsByClassName("accordion__toggle"); | |
var i; | |
for (i = 0; i < acc.length; i++) { | |
acc[i].addEventListener("click", function () { | |
var panel = this.nextElementSibling; | |
if (this.classList.contains('active')) { | |
this.classList.remove("active"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Sticky Navigation | |
var header = document.getElementById('header'); | |
var sticky = header.offsetTop; | |
window.onscroll = function () { | |
stickyNav() | |
}; | |
function stickyNav() { | |
if (window.pageYOffset > sticky) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function theme_enqueue_styles() { | |
wp_enqueue_style( 'slick', get_template_directory_uri() . '/assets/vendor/slick/slick.css' ); | |
wp_enqueue_style( 'slick-theme', get_template_directory_uri() . '/assets/vendor/slick/slick-theme.css'); | |
//wp_enqueue_style( 'google-fonts', 'https://fonts.googleapis.com/css?family=Rajdhani:500,700|Roboto:700&display=swap'); | |
wp_enqueue_script( 'font-awesome', 'https://kit.fontawesome.com/1a3f79275c.js' ); | |
wp_enqueue_script( 'mixitup', get_template_directory_uri() . '/assets/vendor/mixitup/mixitup.min.js', array( 'jquery' ), '3', true ); | |
wp_enqueue_script( 'slick', get_template_directory_uri() . '/assets/vendor/slick/slick.min.js', array( 'jquery' ), '1.8', true ); | |
//wp_enqueue_script( 'match-height', get_template_directory_uri() . '/assets/vendor/jquery.matchHeight-min.js', array( 'jquery' ), '1.6.0', true ); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if ($landing_block_video_vimeo || $landing_block_video_youtube) : ?> | |
<div class="reveal small" id="videoModal<?php echo $i; ?>" data-reveal> | |
<?php if ($landing_block_video_vimeo) : ?> | |
<div class="responsive-embed"> | |
<iframe src="https://player.vimeo.com/video/<?php echo $landing_block_video_vimeo ?>" | |
width="640" height="360" | |
frameborder="0" allow="autoplay; fullscreen" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This error occurred when transferring the Avada theme from an external host to pantheon. There was a MIME type error followed by a 404 on the homepage. I believe the random string pantheon uses for file struture differed from the other pages of the site. | |
Make sure WP_cache is off and added the addition if statement below to fix. | |
//define('WP_CACHE', true); | |
if (isset($_ENV['PANTHEON_ENVIRONMENT'])) { | |
define('FS_METHOD', 'direct'); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="filter-controls"> | |
<div class="filter-controls__drop-down"> | |
<select id="filterSelect"> | |
<?php $hiterms = get_terms("dealer_locations", array("orderby" => "slug", "parent" => 0)); ?> | |
<?php foreach ($hiterms as $key => $hiterm) : ?> | |
<optgroup label="<?php echo $hiterm->name; ?>"> | |
<?php $loterms = get_terms("dealer_locations", array("orderby" => "slug", "parent" => $hiterm->term_id)); ?> | |
<?php if ($loterms) : ?> | |
<?php foreach ($loterms as $key => $loterm) : ?> | |
<option data-filter=".<?php echo $loterm->slug; ?>"><?php echo $loterm->name; ?></option> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Headers | |
if (!empty($_SERVER['HTTPS'])) { | |
function add_hsts_header($headers) { | |
$headers['strict-transport-security'] = 'max-age=31536000; includeSubDomains'; | |
$headers['x-xss-protection'] = '1; mode=block'; | |
$headers['x-content-type-options'] = 'nosniff'; | |
$headers['x-frame-options'] = 'SAMEORIGIN'; | |
$headers['referrer-policy'] = 'no-referrer-when-downgrade'; | |
$headers['permissions-policy'] = 'geolocation=(); midi=(); notifications=(); push=(); sync-xhr=(); microphone=(); camera=(); magnetometer=(); gyroscope=(); vibrate=(); fullscreen=(); payment=()'; | |
$headers['content-security-policy'] = 'default-src \'self\' \'unsafe-inline\' \'unsafe-eval\' https: data:'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Post in PHPmyadmin SQL tab when updraft does not correctly replace URLs | |
UPDATE wp_options SET option_value = replace(option_value, 'Old URL', 'New URL') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts SET post_content = replace(post_content, 'Old URL', 'New URL'); | |
UPDATE wp_postmeta SET meta_value = replace(meta_value,'Old URL','New URL'); | |
UPDATE wp_usermeta SET meta_value = replace(meta_value, 'Old URL','New URL'); | |
UPDATE wp_links SET link_url = replace(link_url, 'Old URL','New URL'); | |
UPDATE wp_comments SET comment_content = replace(comment_content , 'Old URL','New URL'); | |
UPDATE wp_posts SET post_content = replace(post_content, 'Old URL', 'New URL'); | |
UPDATE wp_links SET link_image = replace(link_image, 'Old URL','New URL'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// functions.php | |
function custom_posts_per_page($query) { | |
if (is_home()) { | |
$query->set('posts_per_page', 8); | |
} | |
if (is_search()) { | |
$query->set('posts_per_page', -1); | |
} | |
if (is_archive()) { | |
$query->set('posts_per_page', 3); |
NewerOlder