Skip to content

Instantly share code, notes, and snippets.

Craig Simpson craigsimps

View GitHub Profile
View functions.php
<?php
add_filter( 'genesis_customizer_theme_settings_config', __NAMESPACE__ . '\\remove_genesis_customizer_panels' );
/**
* Remove redundant Genesis Customizer panels.
*
* @param array $config The config array for theme settings in the Customizer.
*
* @return array
*/
View functions.php
<?php
add_action( 'genesis_before_sidebar_widget_area', __NAMESPACE__ . '\\sidebar_switcher' );
/**
* Conditionally replace the sidebar.
*
* @since 1.0.0
*/
function sidebar_switcher() {
View functions.php
<?php
wp_add_inline_script(
'handle',
'// <![CDATA[
// Custom JS here.
// ]]>'
);
View functions.php
<?php
/**
* Remove redundant Genesis meta boxes.
*
* @param string $pagehook Page hook for the Theme Settings page.
*
* @since 1.1.0
*/
add_action( 'genesis_theme_settings_metaboxes', function ( $pagehook ) {
View functions.php
<?php
/**
* Register widget areas.
*
* @uses genesis_register_widget_area()
*
* @since 1.0.0
*/
add_action( 'widgets_init', function () {
View style.scss
//----------------------------
// Base
//----------------------------
@import "base/typography";
@import "base/*";
View style.scss
//----------------------------
// Base
//----------------------------
@import "base/*";
View style.scss
//----------------------------
// Base
//----------------------------
@import "base/accessibility";
@import "base/buttons";
@import "base/forms";
@import "base/headings";
@import "base/layout";
@import "base/lists";
View Gulpfile.js
toolkit.extendConfig({
/* ... Shortened for readability. */
js: {
'global': [ /* File will be output as global.js and global.min.js */
'develop/js/responsive-menus.js',
'develop/js/backstretch.jquery.js',
'develop/js/bxslider.jquery.js',
'develop/js/main.js'
],
'account': [ /* File will be output as account.js and account.min.js */
View Gulpfile.js
toolkit.extendConfig({
/* ... Shortened for readability. */
js: {
'global': [ /* File will be output as global.js and global.min.js */
'develop/js/responsive-menus.js',
'develop/js/backstretch.jquery.js',
'develop/js/bxslider.jquery.js',
'develop/js/main.js'
],
'account': [ /* File will be output as account.js and account.min.js */
You can’t perform that action at this time.