Skip to content

Instantly share code, notes, and snippets.

View matthewselby's full-sized avatar

Matt Selby matthewselby

View GitHub Profile
@matthewselby
matthewselby / enqueue-theme-stylesheet-with-theme-version.php
Created April 15, 2019 16:45
WordPress - enqueue theme stylesheet cache-busting with theme version
<?php
/* don't include <?php */
function my_theme_enqueue_assets() {
wp_enqueue_style( 'stylesheet', get_stylesheet_uri(), array(), $my_theme->parent()->get( 'Version' ) );
// this loads your active theme's /style.css with the theme version added to it
}
add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_assets' );
@matthewselby
matthewselby / wordpress-force-login.php
Last active March 21, 2019 21:22
Force any WordPress site visitor to login before viewing the site
add_action( 'template_redirect', 'force_login' );
function force_login () {
// if the user is not logged in
if ( ! is_user_logged_in() ):
// Redirect to the login page
header( 'Location: /wp-login.php?redirect_to=/' );
die();
endif;
}
@matthewselby
matthewselby / nuvo-centered-button.html
Created March 13, 2018 00:04
Nuvolum - Small code snippet to make centered button on Nuvo-Express sites
<div style="display:flex;justify-content:center;align-items:center;">
<a target="_blank" rel="noopener" href="ADD LINK HERE">
<button class="btn-md" type="button">ADD TEXT HERE</button>
</a>
</div>
@matthewselby
matthewselby / gist:bc3c5c61192350a03ac690a2b84a41ce
Created February 9, 2018 19:17
NUVO - home h1 block - removing span/spacing and centering with flexbox -ms
.home > div.animated-home.bounce.site-container > div > div > div:nth-child(2) > div:nth-child(1) > div > div:nth-child(1) > div > div > p {
margin-bottom: 0;
}
.home h1.mainh1 {
margin-top: 0 !important;
}
.home > div.animated-home.bounce.site-container > div > div > div:nth-child(2) > div:nth-child(1) > div > div:nth-child(1) > div {
text-align: center;
@matthewselby
matthewselby / nuvolum-seamless-ref-thank-you.html
Last active March 8, 2018 00:25
Nuvolum Seamless ref thank you
<img src="https://cdn.nuvolum.com/images/badges/hipaa-certified.png" alt="HIPAA Certified" width="120" height="61" /><br><br>
<p>Thank you for submitting your information securely to our office.</p>
<p>Rest assured that we are very serious about patient privacy, and as such, all information is securely encrypted and transmitted to our office using HIPAA-compliant protocols and services.</p>
@matthewselby
matthewselby / nuvo-express-home-animation-hot-fix-2017.css
Last active November 9, 2017 00:13
nuvo-express home animation hot fix 2017. Currently on BFSC and ATOS
.animated-home.bounce.site-container {
margin-top: inherit;
top: inherit;
}
/*To target IE 6 and 7*/
/*To target IE 8, 9 and 10*/
@media screen\0, screen\9 {
.animated-home.bounce.site-container {
margin-top: 60px;
@matthewselby
matthewselby / nuvo-footer-link-bullet.html
Created October 27, 2017 21:57
Nuvo Express Footer bullet for little links
@matthewselby
matthewselby / nuvo-express-procedure-sidebar-border-top.css
Created October 17, 2017 17:28
Nuvo-Express css for adding border top to procedure sidebar. Used when sidebar and top bar are similar colors. Replace color with highlight from color palette.
.single-procedure .sidebar-primary {
border-top: 2px solid #fff;
}
@matthewselby
matthewselby / rcf-squarespace-fancy-a.css
Created October 17, 2017 00:13
RefugeCF Squarespace fancy anchor tags - WIP
/*===== Start: anchor tag styles -ms ======*/
.html-block a:not(.sqs-block-button-element):after {
background: #367279;
content: "";
display: block;
position: absolute;
bottom: 0;
left: -1.5px;
height: 1px;
width: calc(100% + 3px);
@matthewselby
matthewselby / nuvo-express-video-home-widget.html
Last active October 23, 2017 20:29
Nuvo Express video home widget content. Replace VIDEOID with the youtube ID for the practice overview
<strong>About</strong> the Practice<a id="play" class="fancybox-youtube btn-play" href="https://www.youtube.com/embed/xxxx?autoplay=1&amp;autohide=1&amp;rel=0&amp;showinfo=0">Play</a>Watch the <strong>Video</strong>