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
add_action( 'woocommerce_before_shop_loop', 'generatepress_wc_before_shop_loop' ); | |
/** | |
* Add opening element inside shop page. | |
* | |
* @since 1.3 | |
*/ | |
function generatepress_wc_before_shop_loop() { | |
$classes = apply_filters( 'generate_woocommerce_container_classes', array( | |
'wc-columns-' . generatepress_wc_get_setting( 'columns' ), | |
//'wc-tablet-columns-' . generatepress_wc_get_setting( 'tablet_columns' ), |
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
add_filter( 'generate_smooth_scroll_elements', function( $elements ) { | |
$elements[] = 'a[href*="#"]'; | |
return $elements; | |
} ); |
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
add_filter( 'generate_header_element_display', function( $display, $element_id ) { | |
if ( 10 === $element_id && is_author() ) { | |
$display = false; | |
} | |
return $display; | |
}, 10, 2 ); |
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 | |
/** | |
* The template for displaying Archive pages. | |
* | |
* @package GeneratePress | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) { | |
exit; // Exit if accessed directly. | |
} |
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
.main-navigation .site-branding { | |
float: left; | |
} | |
.main-navigation .site-branding a { | |
line-height: 60px; | |
font-size: 20px; | |
} |
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
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"> |
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
add_action( 'admin_init', 'tu_remove_google_fonts' ); | |
function tu_remove_google_fonts() { | |
add_filter( 'generate_google_fonts_array', '__return_false' ); | |
} |
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
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' ); | |
} | |
} |
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
<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"); | |
} ); | |
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 | |
/** | |
* The template for displaying posts within the loop. | |
* | |
* @package GeneratePress | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) { | |
exit; // Exit if accessed directly. | |
} |