Skip to content

Instantly share code, notes, and snippets.

@sassinack
sassinack / functions.php
Created December 27, 2012 00:52
Genesis: Add structural wraps for full width
/** Add Structural wraps for full width */
add_theme_support( 'genesis-structural-wraps', array( 'header', 'nav', 'subnav', 'inner', 'footer-widgets', 'footer' ) );
@sassinack
sassinack / functions.php
Created December 27, 2012 15:08
Genesis: PHP: custom styles tinymce editor
// Custom Styles
add_filter( 'tiny_mce_before_init', 'my_custom_tinymce' );
function my_custom_tinymce( $init ) {
$init['theme_advanced_buttons2_add_before'] = 'styleselect';
$init['theme_advanced_styles'] = 'Red=red,Content Light CTA =lightCTA,Content Dark CTA=darkCTA';
return $init;
}
@sassinack
sassinack / style.css
Created December 27, 2012 15:11
Genesis:CSS: inner shadow below nav
#inner {
margin: 0 auto;
overflow: hidden;
padding: 20px;
background-image: url(images/shadow-top.png);
background-repeat: no-repeat;
background-position: top center;
border-top: 1px solid #cbcbcb;
}
@sassinack
sassinack / style.css
Created December 27, 2012 15:14
CSS: Responsive Chat Tab
.fixed-chat-tab {
background: rgba(52, 54, 66, .85);
display: block;
position: fixed;
bottom: 0px;
height: 60px;
width: 100%;
}
#fixed-chat {
@sassinack
sassinack / style.css
Created December 27, 2012 15:09
CSS: Fixed Chat Tab
#fixed-chat {
position: fixed;
right: 0;
bottom: 45%;
display: block;
width: 70px;
height: 50px;
overflow: hidden;
z-index: 999;
}
@sassinack
sassinack / functions.php
Created December 27, 2012 15:08
Genesis: PHP: create widget areas
//add php functionality in text widget
add_filter('widget_text', 'php_text', 99);
function php_text($text) {
if (strpos($text, '<' . '?') !== false) {
ob_start();
eval('?' . '>' . $text);
$text = ob_get_contents();
ob_end_clean();
}
@sassinack
sassinack / style.css
Created December 27, 2012 15:13
Genesis:Genesis Slider: CSS
/* Slider Styles for Genesis Responsive Slider
------------------------------------------------------------ */
.slider li {
list-style: none;
}
.slider {
position: relative;
}
@sassinack
sassinack / functions.php
Created January 8, 2013 23:41
PHP: functions: register and display sidebar
register_sidebar( array(
'id' => 'fixed-tab',
'name' => 'Fixed Tab',
'description' => 'Place fixed tab code here.',
'before_widget' => '<div id="fixed-chat" class="">',
'after_widget' => '</div>',
) );
@sassinack
sassinack / functions.php
Created January 8, 2013 23:42
PHP: Genesis: Register Genesis Sidebar
genesis_register_sidebar(array(
'name'=>'Home Featured Text',
'description' => 'This is centered below the slider, place your favorite testimonial or mission statement here.',
'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>',
'before_title'=>'<h4 class="widgettitle">','after_title'=>'</h4>'
));
@sassinack
sassinack / functions.php
Created January 9, 2013 00:07
PHP: Genesis: Custom Page Title
// Custom Page Title Area
// Register Page Title Sidebar
genesis_register_sidebar( array(
'id' => 'page-title',
'name' => __( 'Page Title', 'sf-edd' ),
'description' => __( 'This is the page title section.', 'sf-edd' ),
) );
// Display Custom Page Sidebar
/** Add the page title section */