Skip to content

Instantly share code, notes, and snippets.

@diggeddy
diggeddy / Example SVG Markup
Created February 7, 2018 15:17
Just a small example of SVG markup
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="500" height="160" xmlns:xlink="http://www.w3.org/1999/xlink">
<polygon class="shape" points="150,75 112.5,140 37.5,140 0,75 37.5,10 112.5,10" fill="#006791"></polygon>
</svg>
@diggeddy
diggeddy / Elementor - Gallery Masonry
Last active June 28, 2018 17:17
Add masonry to the Elementor Gallery Widget. Apply awp-masonry class to gallery widget
@diggeddy
diggeddy / Auto Drop Cap all posts
Created February 21, 2018 14:54
Add drop cap to first letter of first paragraph all posts
/*--- Automatic drop cap first letter first paragraph all single poss ----*/
.single-post .entry-content > p:first-of-type:first-letter {
float: left;
clear: both;
font-size: 3em;
font-weight: bold;
line-height: 0.8em;
margin: 0.1em 0.1em 0em 0px;
padding: 3px 6px;
color: #fff;
@diggeddy
diggeddy / GP Site Agency - In Page Headings
Created March 7, 2018 16:22
GeneratePress Site: Agency. Add HTML Sections with headings.
/*- Agency Section with Heading -*/
<div class="awp-section">
<!-- content before heading -->
<div class="flex-container awp-heading">
<div class="block-title">
<h4>H4 Heading</h4>
</div>
<h2>H2 Heading</h2>
p tag text
<a class="button cta" href="#" data-cta="the label">the label</a>
@diggeddy
diggeddy / Caption on Featured Image
Created March 17, 2018 19:53
Add caption to featured image
@diggeddy
diggeddy / Elementor Square Flip box
Created March 18, 2018 15:24
Make Elementor flip boxes (or any element square) with the CSS class of: square
.square .elementor-flip-box {
width: 100%;
height: 0;
padding-bottom: 100%;
}
@diggeddy
diggeddy / GP Sites - Navigator Mobile footer menu
Created May 9, 2018 16:14
Fixed mobile footer header with slideout navigation
@diggeddy
diggeddy / Add content to comments box action
Created May 23, 2018 17:17
Add content below the Add Comment Button in WordPress Comments
add_action('comment_form', 'db_add_comment_content');
function db_add_comment_content() {
$commenter = wp_get_current_commenter();
echo '<p>my content below comment box</p>';
}
@diggeddy
diggeddy / GP PageHeader Background Zoom
Last active May 30, 2018 18:19
Adds a zoom effect to background image
<script type="text/javascript">
window.onload = function() {
var pageHeader = document.querySelectorAll(".generate-content-header");
pageHeader[0].classList.add("zoom");
}
</script>
.generate-content-header {
background-size: 100%;
transition: background-size 2s ease-in;
@diggeddy
diggeddy / Featured Image Caption Shortcode
Last active April 9, 2019 17:53
WordPress Shortcode to display image caption for the featured image