Skip to content

Instantly share code, notes, and snippets.

View ellenbo's full-sized avatar

Ellen Boeke ellenbo

  • Avietech
  • Fort Collins, CO
View GitHub Profile
@ellenbo
ellenbo / Nav | Logo | Nav Menu CSS
Last active August 29, 2015 13:56
WordPress | Genesis Framework: Nav | Logo | Nav menu using a custom three part header area
@media only screen and (min-width: 1025px) {
/* Nav | Logo | Nav */
.custom-header-bar
{
font-family: chisel-normal, sans-serif;
font-size: 16px;
font-size: 1.15vw;
line-height: 1.5;
@ellenbo
ellenbo / AddSVGtoMediaLibrary
Created February 19, 2014 22:27
WordPress: add and use svg files in WP
function cc_mime_types( $mimes ){
$mimes['svg'] = 'image/svg+xml';
return $mimes;
}
add_filter( 'upload_mimes', 'cc_mime_types' );
@ellenbo
ellenbo / 2 column div layout: right column with fixed width, left fluid: CSS
Last active August 29, 2015 14:02
2 column div layout: right column with fixed width, left fluid
.container {
height: auto;
overflow: hidden;
}
.right {
width: 180px;
float: right;
background: #aafed6;
}
@ellenbo
ellenbo / 3 column div layout: two fixed width columns, one fluid column: CSS
Created June 10, 2014 21:58
3 column div layout: two fixed width columns, one fluid column
.container {
height: auto;
overflow: hidden;
}
.left {
float: left;
width: 300px;
}
@ellenbo
ellenbo / Deregister a plugin stylesheet
Created June 10, 2014 23:48
Deregister a plugin stylesheet
add_action( 'wp_print_styles', 'my_deregister_styles', 100 );
function my_deregister_styles() {
wp_deregister_style( '*STYLESHEET HANDLE*' );
}
//Stylesheet handle can be found by going to the plugin index php file and searching for wp_enqueue_style.
//Source: http://justintadlock.com/archives/2009/08/06/how-to-disable-scripts-and-styles
@ellenbo
ellenbo / Genesis Sticky Nav: CSS
Last active October 12, 2017 17:42
Genesis Sticky Nav
/* Secondary Navigation
--------------------------------------------- */
.nav-secondary {
background-color: #333;
display: none;
position: fixed;
top: 0;
width: 100%;
z-index: 999;
@ellenbo
ellenbo / WP Genesis Selectively Remove Page Titles
Last active October 12, 2017 17:56
WP Genesis/StudioPress Remove Page Titles
<?php
/* Remove All Page Titles */
remove_action( 'genesis_entry_header', 'genesis_do_post_title' );
/* Selectively Remove Page Titles */
add_action( 'get_header', 'child_remove_page_titles' );
function child_remove_page_titles() {
$pages = array( 259 );
if ( is_page( $pages ) ) {
@ellenbo
ellenbo / Genesis & WP: Use shortcodes in widgets
Created June 19, 2014 00:08
Genesis & WP: Use shortcodes in widgets
add_filter('widget_text', 'do_shortcode');
//Source: http://www.carriedils.com/extend-wordpress-widgets-without-plugin/
@ellenbo
ellenbo / Excecute PHP in WordPress Text Widget
Last active October 12, 2017 17:39
Execute PHP in WordPress Text Widget
//Execute PHP in WordPress Text Widget
add_filter('widget_text','execute_php',100);
function execute_php($html){
if(strpos($html,"<"."?php")!==false){
ob_start();
eval("?".">".$html);
$html=ob_get_contents();
ob_end_clean();
}
return $html;
@ellenbo
ellenbo / Custom Widgetized Footer
Last active October 12, 2017 17:39
Custom Genesis Widgetized Footer