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 nested category 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
const stickyNav = document.querySelector('#site-navigation') | |
const mutateOptions = { | |
attributes: true | |
} | |
function callback(mutationList, observer) { | |
mutationList.forEach(function(mutation) { | |
if (mutation.type === 'attributes' && mutation.attributeName === 'id') { | |
// handle ID change | |
if (mutation.target.id == 'sticky-navigation') { |
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
.post-image-above-header .inside-article .featured-image,.post-image-above-header .inside-article .post-image{margin-top:0;margin-bottom:2em}.post-image-aligned-left .inside-article .featured-image,.post-image-aligned-left .inside-article .post-image{margin-top:0;margin-right:2em;float:left;text-align:left}.post-image-aligned-center .featured-image,.post-image-aligned-center .post-image{text-align:center}.post-image-aligned-right .inside-article .featured-image,.post-image-aligned-right .inside-article .post-image{margin-top:0;margin-left:2em;float:right;text-align:right}.post-image-below-header.post-image-aligned-center .inside-article .featured-image,.post-image-below-header.post-image-aligned-left .inside-article .featured-image,.post-image-below-header.post-image-aligned-left .inside-article .post-image,.post-image-below-header.post-image-aligned-right .inside-article .featured-image,.post-image-below-header.post-image-aligned-right .inside-article .post-image{margin-top:2em}.post-image-aligned-left>.feat |
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
/* offside-js 1.3.1 22-05-2016 | |
* Minimal JavaScript kit without library dependencies to push things off-canvas using just class manipulation | |
* https://github.com/toomuchdesign/offside.git | |
* | |
* by Andrea Carraro | |
* Available under the MIT license | |
*/ | |
/* Off-canvas element CSS */ | |
:root { |
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
(function() { | |
var dmtoggle = document.getElementById('dmtoggle'); | |
var body = document.body; | |
var darkMode = function() { body.classList.add('dark-mode'); } | |
var lightMode = function() { body.classList.remove('dark-mode'); } | |
var systemPref = undefined; | |
var localPrefDark = function() { |
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 | |
function db_multi_term_custom_loop($atts, $content = null) { | |
// Get all the categories | |
$categories = get_terms( 'category' ); | |
ob_start(); | |
// Loop through the $category terms | |
foreach ( $categories as $category ): | |
// new query for each category term. | |
$customQuery = new WP_Query( |
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( 'block_editor_settings_all', function( $editor_settings ) { | |
$css = 'p a { | |
box-shadow: 0px -1px 0px #14518F inset; | |
padding-bottom: 3px; | |
transition: all 0.6s ease 0s; | |
} | |
p a:hover { | |
box-shadow: 0px -2px 0px #14518F inset; | |
padding-bottom: 3px; | |
}'; |
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 | |
add_shortcode('cat_listing', function($html){ | |
$categories = get_categories(); | |
$html = ''; | |
foreach( $categories as $category ) { | |
$category_link = sprintf( | |
'<a href="%1$s" alt="%2$s">%3$s</a>', | |
esc_url( get_category_link( $category->term_id ) ), | |
esc_attr( $category->name ), | |
esc_html( $category->name ) |
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
function db_custom_cart_count() { | |
if ( ! class_exists( 'WooCommerce' ) ) { | |
return; | |
} | |
if ( ! isset( WC()->cart ) ) { | |
return; | |
} |