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> | |
$('a').each(function() { | |
var a = new RegExp('/' + window.location.host + '/'); | |
if(!a.test(this.href)) { | |
$(this).click(function(event) { | |
event.preventDefault(); | |
event.stopPropagation(); | |
window.open(this.href, '_blank'); | |
}); | |
} |
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
/* Custom Excerpt */ | |
// Remove default hellip | |
function carawebs_remove_hellip( $more ) { | |
$return = str_replace('[...]', '', $more); | |
return $return; | |
} | |
add_filter('excerpt_more', 'carawebs_remove_hellip'); |
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
/* Custom Excerpt */ | |
// Remove default hellip | |
function carawebs_remove_hellip( $more ) { | |
return ''; | |
} | |
add_filter('excerpt_more', 'carawebs_remove_hellip'); | |
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
/* Custom Excerpt */ | |
// Remove default hellip | |
function carawebs_remove_hellip( $more ) { | |
return ''; | |
} | |
add_filter('excerpt_more', 'carawebs_remove_hellip'); | |
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
/** | |
* Stop Empty Search Requests redirecting to homepage | |
*/ | |
//$_GET is an array of variables sent from the search form | |
//isset returns true if $_GET is not null | |
//empty returns true is $_GET is null | |
// function automatically populates the search $_GET request with an empty space | |
function jc_stop_search_redirect( $vars ) { | |
if( isset( $_GET['s'] ) && empty( $_GET['s'] ) ) |
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
html { | |
background: url(your-image-here) no-repeat center center fixed; | |
-webkit-background-size: cover; | |
-moz-background-size: cover; | |
-o-background-size: cover; | |
background-size: cover; | |
} |
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
<Body> | |
<img src ="http://conoregan.com/wp-content/uploads/2014/01/2013-12-04-08.50.18.jpg" class="background"> | |
<div class="wrapper"> | |
<p>Page content</p> | |
</div> | |
</body> | |
//CSS: | |
.wrapper{ |
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
################################################################### | |
# Code cycles through a text file and creates a directory for every line in the file | |
# with the contents of the line the title of the directory | |
################################################################### | |
#! /bin/bash | |
while read line # while there are lines in the file | |
do | |
mkdir -p $line # create a new directory in the working directory titled with the #value of the line | |
done <filename.txt # filename.txt should be the name of the text file you are reading |
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 (is_page() || is_single()) { | |
<?php $background = get_post_meta($post->ID, 'background', true); | |
if ($background) { | |
?> | |
<style type="text/css">body{ url(<?php echo $background; ?>) no-repeat fixed; }</style> | |
<?php } | |
}?> |