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
| <!-- wp:paragraph {"align":"center","customTextColor":"#000000","backgroundColor":"very-light-gray","fontSize":"small"} --> | |
| <p style="color:#000000;text-align:center" class="has-background has-small-font-size has-very-light-gray-background-color">Gutenberg Sample Content.<br/>Put together with ❤️ by <a href="https://artisanthemes.io/">Artisan Themes</a>.</p> | |
| <!-- /wp:paragraph --> | |
| <!-- wp:heading {"level":1} --> | |
| <h1>This is a heading (H1)</h1> | |
| <!-- /wp:heading --> | |
| <!-- wp:heading --> | |
| <h2>This is a heading (H2)</h2> |
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
| <!-- wp:heading {"className":"text-uppercase"} --> | |
| <h2 class="text-uppercase">01. Grid</h2> | |
| <!-- /wp:heading --> | |
| <!-- wp:columns {"className":"has-6-columns"} --> | |
| <div class="wp-block-columns has-6-columns"><!-- wp:column --> | |
| <div class="wp-block-column"><!-- wp:html --> | |
| <div style="height:120px;background-color:#f2f2f2;box-shadow: 0 -4px 0 0 rgba(32,32,32,.1) inset;"></div> | |
| <!-- /wp:html --></div> | |
| <!-- /wp:column --> |
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
| add_filter( 'block_type_metadata_settings', 'filter_metadata_registration', 10, 2 ); | |
| public function filter_metadata_registration( $settings, $metadata ) { | |
| if ( 'core/cover' == $metadata['name'] ) { | |
| if ( is_array( $settings['supports']['color'] ) ) { | |
| $settings['supports']['color']['background'] = true; | |
| } else { | |
| $settings['supports']['color'] = array( |
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 | |
| /* | |
| Plugin Name: My Awesome Custom Functions Plugin | |
| Plugin URI: https://nathaningram.com | |
| Description: A set of custom functions for client websites from Nathan Ingram's Page Builder Developer Course Nov 2020 | |
| Version: 1.0 | |
| Author: Nathan Ingram | |
| Author URI: https://nathaningram.com | |
| License: GPL2 | |
| */ |
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 | |
| //* Do NOT include the opening php tag | |
| /* Edit (or add) the enqueue line for the responsive menu */ | |
| //* Enqueue Scripts | |
| add_action( 'wp_enqueue_scripts', 'executive_load_scripts' ); | |
| function executive_load_scripts() { | |
| wp_enqueue_script( 'executive-responsive-menu', get_bloginfo( 'stylesheet_directory' ) . '/js/responsive-menu.js', array( 'jquery' ), '1.0.0' ); |
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
| The Steps to Take | |
| 1. First, we’ll comment out the sections that add the backstretch script. | |
| 2. Next we’ll add a new function to add the body background-image style, both in front-page.php. | |
| 3. And then we’ll add the positioning styles to style-front.css. |
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
| jQuery(document).ready(function($){ | |
| function mobile_combine_nav() { | |
| $('.nav-header li.secondary-item').remove(); | |
| if ( $('.nav-secondary').css( 'display' ) == 'none' ) { | |
| $('.nav-secondary li').addClass('secondary-item').clone().appendTo('.nav-header ul'); | |
| } | |
| } | |
| mobile_combine_nav(); | |
| $(window).resize(mobile_combine_nav); | |
| }); |
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 | |
| //* Do NOT include the opening php tag | |
| //* Add multiple grid loops to a page template*/ | |
| remove_action ('genesis_loop', 'genesis_do_loop'); // Remove the standard loop | |
| add_action( 'genesis_loop', 'custom_do_grid_loop' ); // Add custom loop | |
| function custom_do_grid_loop() { | |
| $args = array( |
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 the line above when adding to functions.php | |
| // Add theme support for new menu | |
| // Add New Footer Menu; Keep Primary and Secondary Menus | |
| add_theme_support ( 'genesis-menus' , array ( | |
| 'primary' => __( 'Primary Navigation Menu', 'genesis' ), | |
| 'secondary' => __( 'Secondary Navigation Menu', 'genesis' ), | |
| 'footer' => __( 'Footer Navigation Menu', 'genesis' ) | |
| ) ); |
NewerOlder