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 |
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 | |
// Options page for Castots Mega menu icons | |
class CastosMegaMenu { | |
private $castos_mega_menu_options; | |
public function __construct() { | |
add_action( 'admin_menu', array( $this, 'castos_mega_menu_add_plugin_page' ) ); | |
add_action( 'admin_init', array( $this, 'castos_mega_menu_page_init' ) ); | |
} |
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
/* Get Our Elements */ | |
const starterPrice = document.querySelector('.starter-price'); | |
const starterUom = document.querySelector('.starter-uom'); | |
const growthPrice = document.querySelector('.growth-price'); | |
const growthUom = document.querySelector('.growth-uom'); | |
const proPrice = document.querySelector('.pro-price'); | |
const proUom = document.querySelector('.pro-uom'); | |
const btnMonthly = document.querySelector('.btn-monthly'); | |
const btnAnnual = document.querySelector('.btn-annual'); | |
const planDescription = document.querySelector('.plan-description'); |
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
<!-- wp:generateblocks/container {"uniqueId":"9d00a292","containerWidth":640,"paddingTop":"120","paddingRight":"20","paddingBottom":"180","paddingLeft":"20","paddingTopMobile":"100","paddingRightMobile":"20","paddingBottomMobile":"160","paddingLeftMobile":"20","backgroundColorOpacity":0.19,"gradient":true,"gradientDirection":270,"gradientColorOne":"#f1c1d2","gradientColorOneOpacity":1,"gradientColorStopOne":0,"gradientColorTwo":"#f4ddf8","gradientColorTwoOpacity":1,"gradientColorStopTwo":100,"bgImage":{"id":2583,"image":{"height":800,"width":1200,"url":"https://gpsites.co/avery/wp-content/uploads/sites/56/avery-1200x800.jpg","orientation":"landscape"}},"bgOptions":{"overlay":false,"position":"left top","size":"cover","repeat":"no-repeat","attachment":"","selector":"pseudo-element","opacity":0.7},"isDynamic":true} --> | |
<!-- wp:generateblocks/headline {"uniqueId":"0d1cf1d8","element":"h1","alignment":"center","backgroundColor":"","backgroundColorOpacity":0.2,"textColor":"#72727f","borderColor":"","borderColorOpa |
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 make_star_bar( $atts ) { | |
$value = shortcode_atts( array( | |
'stars' =>5, | |
'color' => '#f00' | |
),$atts); | |
$prefix = 'star-bar-'; | |
$uniqueClass = uniqid($prefix); | |
$percentage = 100 * $value['stars'] / 5; | |
$html = '<span class="'.$uniqueClass.'">★★★★★</span> | |
<style> |
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 skip-lazy class ( or any class ) to featured image of latest post | |
function skip_lazy_class_first_featured_image($attr) { | |
global $wp_query; | |
if ( !is_single() && 0 == $wp_query->current_post ) { | |
$attr['class'] .= ' skip-lazy'; | |
} | |
return $attr; | |
} | |
add_filter('wp_get_attachment_image_attributes', 'skip_lazy_class_first_featured_image' ); |
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
<!-- wp:generateblocks/container {"uniqueId":"be95a9f6","elementId":"intro","paddingTop":"120","paddingRight":"20","paddingBottom":"20","paddingLeft":"20"} --> | |
<div id="intro" class="gb-container gb-container-be95a9f6"><div class="gb-inside-container"><!-- wp:generateblocks/headline {"uniqueId":"98637e69","alignment":"center"} --> | |
<h2 class="gb-headline gb-headline-98637e69">Discover New Worlds Using GeneratePress & GenerateBlocks</h2> | |
<!-- /wp:generateblocks/headline --> | |
<!-- wp:generateblocks/headline {"uniqueId":"23ca4fcc","elementId":"intro","element":"p","alignment":"center","marginTop":"30","marginRight":"200","marginBottom":"60","marginLeft":"200","marginTopTablet":"30","marginRightTablet":"20","marginBottomTablet":"60","marginLeftTablet":"20"} --> | |
<p id="intro" class="gb-headline gb-headline-23ca4fcc">Create custom layouts of any type with GenerateBlocks. The Grid Block allows you to add any number of columns at any width. Set your column widths individually for desktop, tablet and mobile devices |
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
/* WPSP Grids */ | |
/* Single column align side image */ | |
/* Add wpsp-align class to to WPSP List shortcode wrapper */ | |
.wpsp-card, | |
.wpsp-card a, | |
.wpsp-card .wp-show-posts-meta a, | |
.wpsp-card .wp-show-posts-meta a:visited { | |
color: #fff; | |
} |
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
/* Experimental basic REM spacing and typography */ | |
html { | |
font-size: 18px; | |
} | |
@media(max-width: 768px) { | |
html { | |
font-size: 16px; | |
} |