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 this script after you make your dataLayer = []; call | |
// AND after your GTM code snippet | |
// This needs to go inside the header.php in order for it work globally across your site | |
<script type="text/javascript"> | |
// URL toolbox - helps grabbing elements in the URL | |
var _d = document; | |
var _dl = _d.location; | |
var _dlp = _dl.pathname; | |
var _dls = _dl.search; | |
var _dr = _d.referrer; |
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
<form class="mc-form-example" method="POST" action="./endpoint.php"> | |
<h3>Newsletter Sign Up</h3> | |
<label for="mc-email">Email Address:</label> | |
<input type="email" id="mc-email" name="mc-email" required/> | |
<input type="text" value="pending" id="status" name="status" hidden/> | |
<input type="submit" value="Submit"> | |
</form> |
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
<?php | |
// Allow subscribers to see Private posts and pages | |
$subRole = get_role( 'subscriber' ); | |
$subRole->add_cap( 'read_private_posts' ); | |
$subRole->add_cap( 'read_private_pages' ); | |
// Redirect to home page on login | |
function loginRedirect( $redirect_to, $request_redirect_to, $user ) { | |
if ( is_a( $user, 'WP_User' ) && $user->has_cap( 'edit_posts' ) === false ) { |
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> | |
<!-- | |
Stuart Powers | |
http://sente.cc/ | |
http://twitter.com/stuartpowers | |
--> | |
<html> | |
<head> |