Skip to content

Instantly share code, notes, and snippets.

View ryanrudolph's full-sized avatar

Ryan Rudolph ryanrudolph

View GitHub Profile
@ryanrudolph
ryanrudolph / style.css
Last active March 17, 2023 17:45
Transparent Navigation for Genesis Sample Child
/** Genesis
/* Need to wrap hero image or slider block in an advanced column with a class of top block */
.home .site-header {
background-color: transparent;
}
.top-block {
bottom: 100px;
}
@ryanrudolph
ryanrudolph / style.css
Last active September 14, 2022 19:35
Secondary Navigation CSS
/* Nav Secondary
--------------------------------------------- */
.nav-secondary {
margin-top: 0;
background: #007235; /* Primary theme color */
}
.nav-secondary .wrap {
max-width: 1280px; /* Your theme's pagewrap */
@ryanrudolph
ryanrudolph / transparent-header.css
Last active September 14, 2022 15:29
CSS For A Transparent Header
.home .site-header {
background: transparent;
}
/* Top block is a custom class added to the Gutenberg block. */
.home .top-block {
bottom: 0;
position: relative;
}
@ryanrudolph
ryanrudolph / functions.php
Created December 18, 2019 14:13
Example of Google Fonts and FontAwesome being installed
add_action( 'wp_enqueue_scripts', 'gp_enqueue_scripts_styles' );
/**
* Enqueues custom scripts and styles.
*
* @since 1.0.0
*/
function gp_enqueue_scripts_styles() {
wp_enqueue_style(
'gp-fonts',
@ryanrudolph
ryanrudolph / template-homesites.php
Created October 28, 2019 14:56
Homesites Template
<?php
/**
* Infinity Pro.
*
* Template Name: Homesites
*
*/
remove_action( 'genesis_loop', 'genesis_do_loop' );
@ryanrudolph
ryanrudolph / tracking.php
Created April 29, 2019 17:20
Tracking Codes
<script type="text/javascript"> if (!window.mstag) mstag = {loadTag : function(){},time : (new Date()).getTime()};</script>
<script id="mstag_tops" type="text/javascript" src="//flex.atdmt.com/mstag/site/2ec88bc5-6368-4fb7-b092-c2839a499da5/mstag.js"></script>
<script type="text/javascript"> mstag.loadTag("conversion", {cp:"5050",dedup:"1"})</script>
<noscript> <iframe src="//flex.atdmt.com/mstag/tag/2ec88bc5-6368-4fb7-b092-c2839a499da5/conversion.html?cp=5050&dedup=1" frameborder="0" scrolling="no" width="1" height="1" style="visibility:hidden;display:none"> </iframe> </noscript>
<script>(function(w,d,t,r,u){var f,n,i;w[u]=w[u]||[],f=function(){var o={ti:"4077423"};o.q=w[u],w[u]=new UET(o),w[u].push("pageLoad")},n=d.createElement(t),n.src=r,n.async=1,n.onload=n.onreadystatechange=function(){var s=this.readyState;s&&s!=="loaded"&&s!=="complete"||(f(),n.onload=n.onreadystatechange=null)},i=d.getElementsByTagName(t)[0],i.parentNode.insertBefore(n,i)})(window,document,"script","//bat.bing.com/bat.js","uetq
@ryanrudolph
ryanrudolph / functions.php
Last active April 29, 2019 17:19
Add tracking codes right before </body>
function lh_custom_tracking_codes() {
if( is_page(1709) ) {
jQuery(window).load(function() { ?>
<script type="text/javascript"> if (!window.mstag) mstag = {loadTag : function(){},time : (new Date()).getTime()};</script>
<script id="mstag_tops" type="text/javascript" src="//flex.atdmt.com/mstag/site/2ec88bc5-6368-4fb7-b092-c2839a499da5/mstag.js"></script>
<script type="text/javascript"> mstag.loadTag("conversion", {cp:"5050",dedup:"1"})</script>
@ryanrudolph
ryanrudolph / surrey-post-types.php
Created March 21, 2019 13:47
Example register post types file for mu-plugins
<?php
function surrey_post_types() {
register_post_type( 'service', array(
'supports' => array('title', 'editor', 'thumbnail'),
'public' => true,
'labels' => array(
'name' => 'Services',
'add_new_item' => 'Add New Service',
'edit_item' => 'Edit Service',
<?php
function rr_features() {
register_nav_menu('headerMenuLocation', 'Header Menu Location');
}
add_action('after_setup_theme', 'rr_features');
?>
<?php
// On page.php
wp_nav_menu(array(
@ryanrudolph
ryanrudolph / functions.php
Created February 23, 2019 18:37
Register nav menus
<?php
function rr_features() {
register_nav_menu('headerMenuLocation', 'Header Menu Location');
}
add_action('after_setup_theme', 'rr_features');
?>
<?php
// On page.php
wp_nav_menu(array(