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 | |
/** | |
* This code is intended to be added to your wp-config.php file just below the top comment block. | |
* It should replace the existing define('DB_*') statements. You can add or remove sections | |
* depending on the number of environments you intend to setup. You should change all values of | |
* DB_NAME, DB_USER, DB_PASSWORD, and DB_HOST for each environment, making them all distinct | |
* for security purposes. | |
*/ | |
// determine the current environment |
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 custom_scripts() { | |
wp_enqueue_style('roots_custom', get_template_directory_uri() . '/assets/css/app.css'); | |
} | |
add_action('wp_enqueue_scripts', 'custom_scripts', 200); |
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
jQuery(document).ready(function() { | |
$("#intro").height($(window).height()); | |
$(window).resize(function() { | |
$("#intro").minHeight($(window).height()); | |
$("#intro").css("min-height", "600px"); | |
}); | |
}); |
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
var parentHeight = $('#parent').height(); | |
var childHeight = $('#child').height(); | |
$('#child').css('margin-top', (parentHeight - childHeight) / 2); |
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 id="introArrow" href="#about" class="scroll"><i class="fa fa-angle-down fa-5x"></i></a> | |
<div class="text-center" id="about"></div> |
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
$(window).unload(function() { | |
$('body').scrollTop(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 function list_thumbnail_sizes(){ | |
global $_wp_additional_image_sizes; | |
$sizes = array(); | |
foreach( get_intermediate_image_sizes() as $s ){ | |
$sizes[ $s ] = array( 0, 0 ); | |
if( in_array( $s, array( 'thumbnail', 'medium', 'large' ) ) ){ | |
$sizes[ $s ][0] = get_option( $s . '_size_w' ); | |
$sizes[ $s ][1] = get_option( $s . '_size_h' ); | |
}else{ | |
if( isset( $_wp_additional_image_sizes ) && isset( $_wp_additional_image_sizes[ $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
<?php | |
// Get terms for post | |
// define category slug and name | |
$category = 'journals'; // Taxonomy Name | |
$categoryName = 'Journals'; // Front-end / Plural Name | |
$categorySingle = 'Journal'; // Front-end Singular Name | |
// end definition | |
$terms = get_the_terms( $post->ID , $category ); |
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
$(window).resize(function() { | |
$('#content').height($(window).height() - 46); | |
}); | |
$(window).trigger('resize'); |
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 () { | |
var activeTab = $('[href=' + location.hash + ']'); | |
activeTab && activeTab.tab('show'); | |
}); |
OlderNewer