Skip to content

Instantly share code, notes, and snippets.

View dougedgington's full-sized avatar

Doug Edgington dougedgington

View GitHub Profile
@dougedgington
dougedgington / example.css
Created March 5, 2016 09:02
Horizontal line behind title CSS
/* Horizontal line behind title
--------------------------------------------- */
.title-wrapper {
border-bottom: 3px solid #10222b;
text-align: center;
margin-bottom: 41px;
}
h2.horizontal-line {
@dougedgington
dougedgington / example.html
Created March 5, 2016 08:57
Horizontal line behind title HTML
<div class="title-wrapper">
<h2 class="horizontal-line">This is an example title</h2>
</div>
/* ## Responsive Vimeo Video
--------------------------------------------- */
.video-container {
margin-bottom: 28px;
}
.responsive-video {
position: relative;
padding-bottom: 56.25%; /* 16:9 */
padding-top: 0px;
<?php
//* Shortcode to output video embed with responsive wrapper
function dee_video($atts, $content = null) {
extract(shortcode_atts(array(
'width' => '500',
), $atts));
$output = '<div class="video-container" style="max-width:' . $width . 'px;">';
@dougedgington
dougedgington / functions.php
Created August 7, 2013 20:53
Genesis - move sidebar div above content div
<?php
remove_action( 'genesis_after_content', 'genesis_get_sidebar' );
add_action('genesis_before_content', 'genesis_get_sidebar');
?>
@dougedgington
dougedgington / functions.php
Last active December 20, 2015 12:59
Force SSL on Woocommerce pages and two additional custom pages
<?php
/*
Author: Doug Edgington
Description: modified version of Woocomemrce SSL functionality, forces ssl on Woocommerce pages and two additional custom pages
*/
function dee_ssl_template_redirect() {
if ( ! is_ssl() ) {
if ( is_checkout() || is_account_page() || is_page(48) || is_page(64) ) {
@dougedgington
dougedgington / shortcodes.php
Last active December 19, 2015 13:39
Shortcode to display WordPress bookmark links (Blog Roll)
<?php
/*
Author: Doug Edgington
Description: Shortcode to display WordPress bookmark links (Blog Roll).
Used to add links to a page rather than a sidebar using the WordPress links widget.
*/
function dee_display_bookmark_links() {
$args = array(
@dougedgington
dougedgington / shortcodes.php
Created May 27, 2013 01:43
Shortcode to display a minimum order total required message to users in a specific user role on checkout page when using Woocommerce
<?php
/*
Author: Doug Edgington
Description: Shortcode to display a minimum order total required message to
users in a specific user role on checkout page when using Woocommerce
*/
function dee_minimum_order_total_message() {
@dougedgington
dougedgington / functions.php
Last active December 17, 2015 18:39
Require a minimum order total in Woocommerce for a user role
<?php
/*
Author: Doug Edgington
Description: Require a minimum order total in Woocommerce for a user role
*/
function dee_minimum_order_total_required() {
if( is_user_logged_in() ) {
@dougedgington
dougedgington / functions.php
Created April 1, 2013 07:45
Output sidebar above the header with the Genesis Framework
<?php
/*
Author: Doug Edgington
Description: If sidebar is active, output sidebar above header with the Genesis Framework
*/
add_action( 'genesis_before_header', 'dee_do_top_message' );
function dee_do_top_message() {
if ( is_active_sidebar( 'top-message' ) ) {
echo '<div id="top-message">';