sass sass/style.scss:css/style.min.css --style compressed
This file contains 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
jQuery(window).on('load resize scroll', function(){ | |
jQuery('.home-hero').next().attr('id', 'after-hero'); //adds and anchor id to the sibling element to the home-hero | |
var numItems = jQuery('.home-hero__item').length, //finds all the items | |
numItems = numItems - 1, //subtracts one item as the first slide is not a true slide | |
outerHeightSlide = jQuery('.slide-0').outerHeight(), //finds the height of the first slide item | |
outerHeightSlides = jQuery('.slide-1').outerHeight(), //finds the height of all the slides in the slider | |
scroll = jQuery(window).scrollTop(), //find scroll position | |
allSlidesHeight = outerHeightSlides * numItems + outerHeightSlide - scroll; //does the math to get how far to scroll to the main content | |
/** |
To Rebuild Node Sass, these commands are helpful.
npm uninstall node-sass
npm i node-sass
npm rebuild node-sass
Gulp 3.*
doesn't work on Node 12.*
or above. You have to downgrade Node, or upgrade Gulp.
If you are short on time, downgrade Node to
v11.*
or below; if you need newer features, and have time to possibly fix a load of broken dependencies, upgrade Gulp to4.*
or above!
As others have already mentioned, Gulp 3.*
is not supported on Node 12
or above, so you will have to downgrade your Node version to 11.*
or below, OR upgrade your Gulp to 4.0
.
This file contains 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 | |
$image = get_field('acf_field_name', 'options'); | |
if( !empty( $image ) ) { | |
$image_id = $image['ID']; | |
$alt = $image['alt']; | |
$alt = $image['alt'] ? $image['alt'] : $image['title']; | |
$size = 'medium'; // (thumbnail, medium, large, full or custom size) | |
This file contains 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
.full-width { | |
width: 100vw; | |
position: relative; | |
left: 50%; | |
right: 50%; | |
margin-left: -50vw; | |
margin-right: -50vw; | |
} |
This file contains 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 GetIEVersion() { | |
var sAgent = window.navigator.userAgent; | |
var Idx = sAgent.indexOf("MSIE"); | |
// If IE, return version number. | |
if (Idx > 0) { | |
return parseInt(sAgent.substring(Idx+ 5, sAgent.indexOf(".", Idx))); | |
// If IE 11 then look for Updated user agent string. |
This file contains 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
// customize admin bar css | |
function override_admin_bar_css() { | |
if ( is_admin_bar_showing() ) { | |
/* Could add a custom enqueue here instead of a style tag */ | |
/* Example 👇 */ | |
$version = time(); | |
wp_enqueue_style( 'ip_master-style', get_stylesheet_directory_uri() . '/dist/css/style.css', array(), $version ); | |
?> | |
<style type="text/css"> | |
/* Add Styles Here */ |
This file contains 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
// Disables the block editor from managing widgets in the Gutenberg plugin. | |
add_filter( 'gutenberg_use_widgets_block_editor', '__return_false', 100 ); | |
// Disables the block editor from managing widgets. | |
add_filter( 'use_widgets_block_editor', '__return_false' ); | |
if ( ! function_exists( 'themename_activate_classic_widgets' ) ) : | |
function themename_activate_classic_widgets() { | |
remove_theme_support( 'widgets-block-editor' ); | |
} |
This file contains 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
// Enqueue site-wide scripts | |
add_action( 'wp_enqueue_scripts', 'sk_enqueue_scripts' ); | |
function sk_enqueue_scripts() { | |
wp_enqueue_script( 'global', get_stylesheet_directory_uri() . '/js/global.js', array( 'jquery' ), '', true ); | |
} |