This file contains 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
<!–– Google Analytics Social Button Tracking Script ––> | |
<script type="text/javascript" src="https://s3.amazonaws.com/eo-storage/ga_social_tracking.js"></script> |
This file contains 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
</head> | |
<body onLoad="javascript:pageTracker._setVar('filter_traffic');"> | |
<h1>Excluding traffic by Cookie Content</h1> | |
<p>This page will set a cookie in your browser that will help Google Analytics filter the traffic that comes from your computer when using this browser.</p> | |
<p>Once you have this setup, don't forget to set a filter in Google Analytics.</p> | |
<p>You will need to visit this page only once.</p> | |
<p>However, if you clear your browser cookies, reinstall the browser or operating system, make sure that you revisit this page, so the cookie will be set again.</p> | |
</body> | |
</html> |
This file contains 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
<!-- Google Analytics --> | |
<script> | |
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ | |
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), | |
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) | |
})(window,document,'script','//www.google-analytics.com/analytics.js','ga'); | |
ga('create', 'UA-XXXXX-Y', 'auto'); | |
ga('send', 'pageview'); | |
</script> |
This file contains 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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
<title>Excluding traffic by Cookie Content</title> | |
<meta name=”robots” content=”noindex” /> |
This file contains 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
# BEGIN redirect to homepage | |
RewriteEngine on | |
RewriteCond %{REQUEST_URI} !^/$ | |
RewriteCond %{REQUEST_URI} !\.(gif|jpe?g|png|css|js|php)$ | |
RewriteCond %{REQUEST_URI} !^/wp-admin [NC] | |
RewriteRule .* / [L,R=301] | |
#END redirect to homepage |
This file contains 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
/** Genesis Previous/Next Post Post Navigation */ | |
add_action( 'genesis_before_comments', 'eo_prev_next_post_nav' ); | |
function eo_prev_next_post_nav() { | |
if ( is_single() ) { | |
echo '<div class="prev-next-navigation">'; | |
previous_post_link( '<div class="previous">Previous article: %link</div>', '%title' ); |
This file contains 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
// Adds a filter to form id 7. Replace 7 with your actual form id | |
add_filter('gform_pre_render_7', 'eo_form_pre_render'); | |
function eo_form_pre_render($form) | |
{ | |
// if no user is logged-in, do nothing | |
if ( !is_user_logged_in() ) | |
return $form; | |
foreach ($form['fields'] as &$field) |
This file contains 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
/** | |
* Populate a Gravity Forms Name field. | |
* | |
* @param array $field Gravity Forms field object | |
* @param string|array $name Name components, pass either a string or array when the | |
* nameFormat is 'simple' or an array in all other cases | |
*/ | |
function eo_populate_name_field(&$field, $name = array()) | |
{ | |
if ( !(is_array($field) && ('name' == rgar($field, 'type')) && !empty($name)) ) |
This file contains 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_filter('gform_field_value_first_name', 'eo_populate_name'); | |
add_filter('gform_field_value_last_name', 'eo_populate_name'); | |
function eo_populate_name($value) | |
{ | |
// extract the parameter name from the current filter name | |
$param = str_replace('gform_field_value_', '', current_filter()); | |
// we are interested only in the first_name and last_name parameters | |
if ( !in_array($param, array('first_name', 'last_name')) ) |
This file contains 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
first_name = eo_get_usermeta('first_name'); | |
last_name = eo_get_usermeta('last_name'); |
NewerOlder