Skip to content

Instantly share code, notes, and snippets.

@topleague
topleague / google-adsense-sample-code.js
Created November 21, 2017 07:07
Sample Google AdSense Code
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
style="display:block; text-align:center;"
data-ad-format="fluid"
data-ad-layout="in-article"
data-ad-client="ca-pub-0123456789101112"
data-ad-slot="9876543210"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
@topleague
topleague / cookie-notice-genesis.php
Created October 5, 2024 09:16
How to Add Cookie Notice to Your Genesis Website
@topleague
topleague / add-link-genesis-featured-cpt-widget.php
Last active September 18, 2024 12:57
Adding a Link to Genesis Featured CPT Widget Plugin
@topleague
topleague / add-subtitle-genesis-featured-cpt-widget.php
Last active September 18, 2024 12:56
Adding a Subtitle to Genesis Featured CPT Widget Plugin
.epaper-blocker, .epaperBlockerWrap {display:none;}
@topleague
topleague / comment-time-date.php
Created June 28, 2017 07:27
Remove Comment Time & Link Inside the Date Field in Genesis
// Remove Comment Time & Link Inside the Date Field in Genesis (h/t: http://www.jowaltham.com/customising-comment-date-genesis/)
add_filter( 'genesis_show_comment_date', 'topleague_remove_comment_time_and_link' );
function topleague_remove_comment_time_and_link( $comment_date ) {
printf( '<p %s>', genesis_attr( 'comment-meta' ) );
printf( '<time %s>', genesis_attr( 'comment-time' ) );
echo esc_html( get_comment_date() );
echo '</time></p>';
// Return false so that the parent function doesn't also output the comment date and time
@topleague
topleague / page_sitemap.php
Created August 17, 2017 06:57
Create a Sitemap in Genesis
<?php
/**
* Genesis Framework.
*
* WARNING: This file is part of the core Genesis Framework. DO NOT edit this file under any circumstances.
* Please do all modifications in the form of a child theme.
*
* @package Genesis\Templates
* @author StudioPress
* @license GPL-2.0+
@topleague
topleague / feather-icons-css.txt
Created September 13, 2020 14:27
Customize Feather Icons
.feather {
width: 60px;
height: 60px;
fill: transparent;
stroke: #333333;
stroke-width: .65px;
}
@topleague
topleague / add-the-icon.txt
Created September 13, 2020 14:23
Add the Feather Icons in Genesis
<i data-feather="circle"></i>
@topleague
topleague / feather-icons-cdn.txt
Created September 13, 2020 12:01
Load Feather Icons Scripts from a CDN Provider
<script src="https://unpkg.com/feather-icons"></script>
<script>
feather.replace()
</script>