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
<?php if( have_rows('faqs') ): ?> | |
<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true"> | |
<?php $i=1; while ( have_rows('faqs') ) : the_row(); ?> | |
<div class="panel panel-default"> | |
<div class="panel-heading" role="tab" id="heading-<?php echo $i; ?>"> | |
<h2 class="panel-title"> | |
<a data-toggle="collapse" data-parent="#accordion" href="#collapse-<?php echo $i; ?>" aria-expanded="true" aria-controls="collapseOne"> | |
<?php the_sub_field('question'); ?> | |
</a> | |
</h2> |
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
// 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; |
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
// 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 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
/*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 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
// 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 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 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 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
<?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 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
<?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 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
<?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 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
// 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]'; | |