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
# robots.txt for wordpress | |
# https://gist.github.com/chuckreynolds/135728 | |
User-agent: * | |
Disallow: /cgi-bin/ | |
Disallow: /trackback/ | |
Disallow: /comment-page-* | |
Disallow: /?s=* | |
Disallow: /*.php$ |
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> | |
<html> | |
<head> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> | |
<script src="jquery.ketchup.all.min.js" type="text/javascript"></script> | |
</head> | |
<body> | |
<div id="email"> | |
<span>Enter your email to sign up</span> | |
<form action="/subscribe.php" id="invite" method="POST"> |
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 | |
function ct_paging_nav() { | |
// Don't print empty markup if there's only one page. | |
if ( $GLOBALS['wp_query']->max_num_pages < 2 ) { | |
return; | |
} | |
$paged = get_query_var( 'paged' ) ? intval( get_query_var( 'paged' ) ) : 1; | |
$pagenum_link = html_entity_decode( get_pagenum_link() ); | |
$query_args = array(); |
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
/* | |
Make the Facebook Like box responsive (fluid width) | |
https://developers.facebook.com/docs/reference/plugins/like-box/ | |
*/ | |
/* This element holds injected scripts inside iframes that in some cases may stretch layouts. So, we're just hiding it. */ | |
#fb-root { | |
display: none; | |
} |
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 | |
/* | |
This code snippet can be added to your functions.php file (without the <?php) | |
to add a query string to the login link emailed to the user upon registration | |
which when clicked will validate the user, log them in, and direct them to | |
the home page. | |
*/ | |
/** | |
* This first function is hooked to the 'user_register' action which fires |
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
/* The Grid ---------------------- */ | |
.lt-ie9 .row { width: 940px; max-width: 100%; min-width: 768px; margin: 0 auto; } | |
.lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; } | |
.lt-ie9 .row.large-collapse .column, | |
.lt-ie9 .row.large-collapse .columns { padding: 0; } | |
.lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; } | |
.lt-ie9 .row .row.large-collapse { margin: 0; } | |
.lt-ie9 .column, .lt-ie9 .columns { float: left; min-height: 1px; padding: 0 15px; position: relative; } | |
.lt-ie9 .column.large-centered, .columns.large-centered { float: none; margin: 0 auto; } |
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
var map = null; | |
var marker = null; | |
var infowindow = new google.maps.InfoWindow({size: new google.maps.Size(150, 50)}); | |
function createMarker(latlng, name, html) { | |
var contentString = html; | |
var marker = new google.maps.Marker( | |
{ | |
position: latlng, | |
map: map, |
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 | |
/** | |
* JSON Response | |
* Get json data from url and decode. | |
*/ | |
# Get the WordPress json parser | |
if ( ! function_exists( 'json_parser' ) ) : | |
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
function upload_table($table_id, $csv_file_name) { | |
$accessToken = $_SESSION['accessToken']; | |
// /hubdb/api/v1/tables/:tableId/import | |
$url = "https://api.hubapi.com/hubdb/api/v1/tables/$table_id/import"; | |
$postBody = [ | |
"file" => "@$csv_file_name;type=text/csv", | |
"config" => [ | |
"resetTable" => true, | |
"skipRows" => 1, | |
"format" => 'csv', |
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 | |
/** | |
* @param int $post_id The ID of the post. | |
* @param WP_Post $post The post object. | |
* @param bool $update True if the post already exists and is being updated | |
*/ | |
function wpse_post_ping( $post_id, $post, $update ) { | |
if ( $post->post_status === 'publish' ) { // Only fire when published | |
wp_remote_post( |