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
// Loading scripts in footer | |
(function($) { | |
"use strict"; | |
// example for document ready | |
$(document).ready(function() { | |
// Your code here | |
}); | |
}(jQuery)); |
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($){ | |
$(document).ready(function() { | |
var classes = [ 'style1', 'style2', 'style3' ]; // the classes you want to add | |
$('.item').each(function(i) { // the element(s) you want to add the class to. | |
$(this).addClass(classes[ Math.floor( Math.random()*classes.length ) ] ); | |
}); | |
}); | |
})(jQuery); |
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 | |
// You can add this in your function.php file to modify the Wordpress Excerpt | |
if ( !function_exists( 'theme_excerpt_length' ) ) : | |
function theme_excerpt_length( $length ) { | |
return 40; | |
} | |
endif; | |
if ( !function_exists( 'theme_excerpt_more' ) ) : | |
function theme_excerpt_more( $more ) { |
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 | |
function get_page_link() { | |
$pages = get_pages( array( | |
'meta_key' => '_wp_page_template', | |
'meta_value' => 'templates/page-template_name.php' | |
) ); | |
if ( $pages ) { | |
$link = esc_url( get_permalink( $pages[0]->ID ) ); |
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
// Copyright 2014 A Medium Corporation | |
// | |
// z-index.less | |
// Medium.com's z-index scale. Z-index values should always be defined in z-index.less. This | |
// allows us to at a glance determine relative layers of our application and prevents bugs | |
// arrising from arbitrary z-index values. Do not edit the z-index scale! Only add application | |
// scoped z-index values. | |
// Z-Index Scale (private vars) |
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
(?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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> | |
<title>Site Title</title> | |
<link rel="stylesheet" href="/assets/css/style.min.css"> |
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 | |
/** | |
* Disable admin notices for all. | |
*/ | |
function _action_disable_admin_notices() { | |
global $wp_filter; |
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
/*! normalize-all-you-really-need-tho.css v1.0.0 | MIT License */ | |
html { | |
font-family: sans-serif; /* 1 */ | |
-webkit-text-size-adjust: 100%; /* 2 */ | |
-ms-text-size-adjust: 100%; /* 2 */ | |
} | |
body { | |
margin: 0; |
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 | |
/** | |
* Hide admin bar | |
*/ | |
// show admin bar only for admins | |
if ( ! current_user_can( 'manage_options' ) ) { | |
add_filter( 'show_admin_bar', '__return_false' ); | |
} |
OlderNewer