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
ModPagespeed off |
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
<div class="box"> | |
<div class="header">header</div> | |
<div class="nav">nav</div> | |
<div class="content">content</div> | |
<div class="footer">footer</div> | |
</div> |
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
dscacheutil -flushcache; sudo killall -HUP mDNSResponder |
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
Select * from wp_posts where post_type = 'attachment'; |
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 $args = array( | |
'post_type' => 'attachment', | |
'numberposts' => 1, | |
'orderby' => 'rand', | |
'post_status' => null, | |
'post_parent' => get_the_ID(), | |
'post_mime_type' => 'image' | |
); | |
$images = get_children( $args ); |
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
<script type="text/javascript"> | |
function gup( name ) | |
{ | |
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); | |
var regexS = "[\\?&]"+name+"=([^&#]*)"; | |
var regex = new RegExp( regexS ); | |
var results = regex.exec( window.location.href ); | |
if( results == null ) | |
return ""; | |
else |
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
//This will start a session, then save the posted_data[something] to the session | |
add_action('init', 'myStartSession', 1); | |
add_action('wp_logout', 'myEndSession'); | |
add_action('wp_login', 'myEndSession'); | |
function myStartSession() { | |
if(!session_id()) { | |
session_start(); | |
} |
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 ( function_exists( 'wpcf7_enqueue_scripts' ) ) { | |
wpcf7_enqueue_scripts(); // This loads the needed scripts | |
//wpcf7_enqueue_styles(); // This loads your styles, but i prefer to use my own attached | |
} | |
?> |
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
/********************* | |
CONTACT FORM 7 | |
*********************/ | |
/* Colours */ | |
// Primary alert colours | |
$alert-yellow: #eadb33; | |
$alert-red: #be3333; |
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
//This will start a session, then save the posted_data[something] to the session | |
add_action('init', 'myStartSession', 1); | |
add_action('wp_logout', 'myEndSession'); | |
add_action('wp_login', 'myEndSession'); | |
function myStartSession() { | |
if(!session_id()) { | |
session_start(); | |
} |