This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
*This creates a box for optin, with separate text and form | |
*/ | |
/** Register Opt in Widget **/ | |
function lob_signup_box_load_widgets() { | |
register_widget( 'lob_signup_box_Widget' ); | |
} | |
add_action( 'widgets_init', 'lob_signup_box_load_widgets' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Clicky Boxes | |
/** | |
*This creates a widget area for text, and the whole box is clickable | |
* | |
*/ | |
/** Register Widget **/ | |
function lob_boxes_load_widgets() { | |
register_widget( 'Lob_Boxes_Widget' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Remove post-info and post meta for all but post | |
remove_action('genesis_entry_header', 'genesis_post_info',12); | |
remove_action( 'genesis_entry_footer', 'genesis_post_meta' ); | |
add_action('genesis_entry_header', 'child_post_info',12); | |
function child_post_info(){ | |
if (is_singular( 'post' )) | |
genesis_post_info(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ADDING CUSTOM POST TYPE - business card | |
add_action('init', 'all_custom_post_types'); | |
function all_custom_post_types() { | |
$types = array( | |
// Pledge Items | |
array('the_type' => 'bcard', | |
'single' => 'Business Card', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'genesis_entry_content', 'child_share_buttons',6); | |
function child_share_buttons (){ | |
$return_string .='<ul class="share_buttons">'; | |
$return_string .= '<li> | |
<a href="https://twitter.com/share" class="twitter-share-button" data-count="none">Tweet</a> </li> | |
<li class="fb"> | |
<div class="fb-share-button" data-href="http://developers.facebook.com/docs/plugins/" data-type="button"></div> | |
</li> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// JavaScript Document | |
jQuery(function ($) { | |
/* You can safely use $ in this code block to reference jQuery */ | |
$(document).ready(function(){ | |
$('form').find('input[name="log"]').each(function(ev) | |
{ | |
if(!$(this).val()) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function eva_IE_doctype() { | |
?> | |
<!DOCTYPE html> | |
<!--[if IEMobile 7 ]> <html dir="ltr" lang="en-US"class="no-js iem7"> <![endif]--> | |
<!--[if lt IE 7 ]> <html dir="ltr" lang="en-US" class="no-js ie6 oldie"> <![endif]--> | |
<!--[if IE 7 ]> <html dir="ltr" lang="en-US" class="no-js ie7 oldie"> <![endif]--> | |
<!--[if IE 8 ]> <html dir="ltr" lang="en-US" class="no-js ie8 oldie"> <![endif]--> | |
<!--[if (gte IE 9)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html <?php language_attributes( 'html' ); ?>><!--<![endif]--> | |
<head> | |
<meta charset="<?php bloginfo( 'charset' ); ?>" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Add Modernizer | |
function eva_modernizer_doctype() { | |
?> | |
<!DOCTYPE html> | |
<html class="no-js" <?php language_attributes( 'html' ); ?>> | |
<head> | |
<meta charset="<?php bloginfo( 'charset' ); ?>" /> | |
<?php | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/**Allow line breaks and spans in widget title*/ | |
add_filter('widget_title','my_widget_title',10,3); | |
function my_widget_title($title) | |
{ | |
$title = str_replace("[br]", "<br/>", $title); | |
$title = str_replace("[sp]", "<span>", $title); | |
$title = str_replace("[/sp]", "</span>", $title); | |
return $title; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ( wp_is_mobile() ) { | |
wp_redirect( 'http://example.com/m/' ); | |
exit; | |
} |