View gist:fae398a39bb8802364e623836941eab4
add_filter( 'generate_smooth_scroll_elements', function( $elements ) {
$elements[] = 'a[href*="#"]';
return $elements;
} );
View gist:c270163b367cc7009a2b217094e861f6
add_filter( 'generate_header_element_display', function( $display, $element_id ) {
if ( 10 === $element_id && is_author() ) {
$display = false;
}
return $display;
}, 10, 2 );
View archive-{post_type}.php
<?php
/**
* The template for displaying Archive pages.
*
* @package GeneratePress
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
View gist:9f99bbfa532ea4f9eafb6bd238b8cc9a
.main-navigation .site-branding {
float: left;
}
.main-navigation .site-branding a {
line-height: 60px;
font-size: 20px;
}
View gist:e41f0e0d083b4c2350ac772eb69479f1
add_action( 'after_setup_theme', 'tu_navigation_as_header' );
function tu_navigation_as_header() {
remove_action( 'generate_header', 'generate_construct_header' );
add_action( 'generate_inside_navigation', 'tu_site_title_navigation' );
}
function tu_site_title_navigation() {
?>
<div class="site-branding">
<p class="main-title" itemprop="headline">
View gist:2d037a5a7341ffc67c6af1a056b54e34
add_action( 'admin_init', 'tu_remove_google_fonts' );
function tu_remove_google_fonts() {
add_filter( 'generate_google_fonts_array', '__return_false' );
}
View gist:38a00e43abb9a758c14a5e07ffbee0b3
add_action( 'wp', 'tu_add_page_header_image_woocommerce', 60 );
function tu_add_page_header_image_woocommerce() {
if ( function_exists( 'is_woocommerce' ) && is_woocommerce() ) {
add_action( 'generate_before_content', 'generate_page_header' );
}
}
View gist:589b9e91bca7205883b0454f15a4dcf9
<script>
var hamburger = document.querySelector(".hamburger"),
menuToggle = document.querySelector( '.menu-toggle' ),
menuItems = document.querySelectorAll( 'nav ul a' ),
closeElements = document.querySelectorAll( '.slideout-overlay, .slider-exit a' );
menuToggle.addEventListener("click", function() {
hamburger.classList.toggle("is-active");
} );
View gist:ebe343298b30bbec84947b940c7526f0
<?php
/**
* The template for displaying posts within the loop.
*
* @package GeneratePress
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
View gist:e125229c3884b769c25b5546d8dd735e
add_filter( 'generate_dashboard_page_capability', 'tu_super_admin_dashboard' );
function tu_super_admin_dashboard() {
return 'manage_sites';
}