View featured-images.min.css
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 |
View offside.css
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 { |
View darkModeToggle.js
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() { |
View multi-loop.php
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( |
View block-editor-59-styles.php
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; | |
}'; |
View cat_list_shortcode.php
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 ) |
View woo-cart-count-shortcode.php
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; | |
} |
View custom-loop-shortcode-gpp.php
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_custom_loop_shortcode($atts, $content = null) { | |
global $post; | |
// Set query args | |
$args = array( | |
'post_type' => 'post', | |
'posts_per_page' => '3', | |
'post__not_in' => array( $post->ID ), // don't display current post | |
); | |
// Optional arguments for setting category term relationship on single post |
NewerOlder