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
<meta name="format-detection" content="telephone=no"> |
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
Quit MAMP | |
Remove all files (but not directories) in the mysql dir. | |
/Applications/MAMP/db/mysql/ | |
Relaunch MAMP |
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 if(in_category('videos')) : ?> | |
// show video | |
<?php else: ?> | |
// show the other thing you want | |
<?php endif ?> |
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
// this seems to work perfectly | |
<div class="flexslider"> | |
<ul class="slides"> | |
<?php if(have_rows('home_slider')): ?> | |
<?php while( have_rows('home_slider') ): the_row(); ?> | |
<li> | |
<?php the_sub_field('slide_title'); ?><br/> |
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
$('a').on('click', function(e){ | |
// Grab the url to pump into the modal 'continue' button. | |
var thisHref = $(this).attr('href'); | |
// Grab the attr so we can check if its external | |
var attr = $(this).attr('rel'); | |
// Check if link has rel="external" | |
if (typeof attr !== typeof undefined && attr !== 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
Posted <?php echo human_time_diff( get_the_time('U'), current_time('timestamp') ) . ' ago'; ?> |
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
document.getElementById('your-id').onclick = function(){ | |
// action | |
} | |
// or | |
document.getElementByClassName('your-class').onclick = function(){ | |
// action | |
} |
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
<script type="text/javascript"> | |
document.write(new Date().getFullYear()); | |
</script> | |
// wordpress | |
<?php echo date("Y"); ?> | |
// More examples | |
http://updateyourfooter.com/ |
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
RewriteEngine On | |
RewriteCond %{SERVER_PORT} 80 | |
RewriteRule ^(.*)$ https://{HTTP_HOST}/$1 [R=301,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
function youHovered(e){ | |
e.preventDefault(); | |
console.log('wow, you clicked. You\'re great'); | |
} | |
$('p').on('click', youHovered); |
NewerOlder