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
/* CSS Calc combine percentage width with pixels | |
http://stackoverflow.com/questions/11117216/css-width-calc100-100px-alternative-using-jquery | |
http://css-tricks.com/a-couple-of-use-cases-for-calc/ | |
*/ | |
.interior .faq h2:hover:before { | |
width: calc(100% + -7px); | |
} |
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
// create Wordpress admin account through FTP | |
//http://forrst.com/posts/Create_New_Admin_Account_in_WordPress_via_FTP-NOF | |
function add_admin_acct(){ | |
$login = 'myacct1'; | |
$passw = 'mypass1'; | |
$email = '[email protected]'; | |
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 | |
// http://www.advancedcustomfields.com/resources/gallery/ | |
$images = get_field('gallery'); | |
if( $images ): ?> | |
<ul> | |
<?php foreach( $images as $image ): ?> | |
<li> | |
<a href="<?php echo $image['url']; ?>"> |
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 | |
// http://stackoverflow.com/questions/3161816/php-cut-a-string-after-x-characters | |
function truncate_string($string,$length=70,$append="...") { | |
$string = trim($string); | |
if(strlen($string) > $length) { | |
$string = wordwrap($string, $length); | |
$string = explode("\n",$string); | |
$string = array_shift($string) . $append; |
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 | |
// http://stackoverflow.com/questions/4795385/how-do-you-use-bcrypt-for-hashing-passwords-in-php | |
require_once 'lib/password.php'; | |
$password = "12345"; | |
$hash = password_hash($password, PASSWORD_BCRYPT); |
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
// remove Yoast wp seo score title that's shown on the WP admin edit pages | |
add_action('admin_head', 'remove_wp_seo_score_title'); | |
function remove_wp_seo_score_title() { | |
echo '<style> | |
.misc-pub-section .wpseo-score-title { | |
display: none; | |
} | |
</style>'; | |
} |
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
// For when the yoast wordpress SEO sitemap is throwing up a 404 page | |
// more info here: https://kb.yoast.com/kb/my-sitemap-index-is-giving-a-404-error-what-should-i-do/ | |
// Enter into the htaccess file BEFORE the standard WP rewrite stuff | |
# Yoast SEO - XML Sitemap Rewrite Fix | |
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^sitemap_index.xml$ /index.php?sitemap=1 [L] |
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
/*http://css-tricks.com/numbering-in-style/*/ | |
.interior ol { | |
counter-reset: my-badass-counter; | |
list-style: none; | |
} | |
.interior ol li { | |
position: relative; | |
padding: 0 0 0 10px; |
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 HTML Markup | |
<div class="container"> | |
<div class="row"> | |
<div class="col-sm-4 text-center"> | |
<a href="images/space.jpg" data-toggle="modal" data-target=".testing"> | |
<img src="images/space-resized.jpg" alt=""> | |
</a> | |
</div> | |
<div class="col-sm-4 text-center"> |
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
// Gravity Forms validation errors styling CSS | |
.validation_message { | |
font: 12px/1.5em 'Raleway', Arial, sans-serif; | |
color: #E70F20; | |
} | |
.validation_error, | |
.gform_confirmation_message { | |
text-align: center; |