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 btn = document.getElementById('button'); | |
| btn.addEventListener('click', loadText); | |
| function loadText(){ | |
| //Create XHR Object | |
| var xhr = new XMLHttpRequest(); | |
| //OPEN - type, url/file, async |
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 btn1 = document.getElementById('button1'); | |
| btn1.addEventListener('click', loadUser); | |
| // REQUEST SINGLE USER'S DATA | |
| function loadUser(){ | |
| var xhr = new XMLHttpRequest(); | |
| xhr.open('GET', 'assets/json/user.json', true); | |
| xhr.onload = function(){ |
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 btn2 = document.getElementById('button2'); | |
| btn2.addEventListener('click', loadUsers); | |
| //REQUEST ALL USERS DATA | |
| function loadUsers(){ | |
| var xhr = new XMLHttpRequest(); | |
| xhr.open('GET', 'assets/json/users.json', true); | |
| xhr.onload = function(){ |
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 | |
| // ========================================================================= | |
| // REMOVE STOREFRONT PAGE TITLE | |
| // ========================================================================= | |
| function remove_storefront_actions() { | |
| // SINGLE POST | |
| // ================================= | |
| remove_action( 'storefront_single_post', 'storefront_post_header', 10); | |
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 | |
| // ========================================================================= | |
| // FACEBOOK SDK | |
| // ========================================================================= | |
| function add_facebook_sdk(){ | |
| include('lib/facebook-sdk.php'); | |
| } | |
| add_action('genesis_before', 'add_facebook_sdk'); | |
| // ========================================================================= |
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 | |
| // ========================================================================= | |
| // CUSTOM IMAGE SIZE | |
| // ========================================================================= | |
| add_image_size( 'grid-img', 700, 368, true ); | |
| // ========================================================================= | |
| // FEATURED IMAGE INSIDE THE LOOP | |
| // ========================================================================= |
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 | |
| // ========================================================================= | |
| // REMOVE STOREFRONT SIDEBAR FROM PRODUCT, CART AND CHECKOUT PAGE | |
| // ========================================================================= | |
| function remove_storefront_sidebar() { | |
| if( is_checkout() || is_cart() || is_product()) { | |
| remove_action( 'storefront_sidebar', 'storefront_get_sidebar', 10 ); | |
| add_filter( 'body_class', function( $classes ) { | |
| return array_merge( $classes, array( 'page-template-template-fullwidth page-template-template-fullwidth-php ' ) ); |
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 | |
| // ========================================================================= | |
| // HIDE STOREFRONT HOMEPAGE TITLE | |
| // ========================================================================= | |
| function storefront_remove_title_from_home_homepage_template() { | |
| if ( is_front_page() ) remove_action( 'storefront_page', 'storefront_page_header', 10 ); | |
| } | |
| add_action( 'wp', 'storefront_remove_title_from_home_homepage_template' ); |
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 Footer | |
| /************************************/ | |
| .site { | |
| display:flex; | |
| flex-direction:column; | |
| min-height:100vh; | |
| } | |
| .site-content { | |
| flex:1; | |
| width: 100%; |