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
$.ajaxSetup({cache:false}); | |
$("a.linkContainingUrl").click(function(){ | |
var post_url = $(this).attr('href'); | |
var post = $('#post-here'); | |
post.html('<img src="../img/ajax-loader.gif" />'); /* shows ajax loader until content is loaded */ | |
post.load(post_url + ' #pull-this-content'); | |
/* within the #post-here div, this will load in the post url from the a:link being clicked, |
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
//Page List Navigation | |
function my_page_tree($this_page) { | |
$pagelist = ''; | |
if( !$this_page->post_parent ) { | |
$children = wp_list_pages('sort_column=menu_order&exclude=430&title_li=&child_of='.$this_page->ID.'&echo=0'); | |
if( $children ) { | |
$pagelist .= '<li class="current_page_item"><a href="'. get_page_link($this_page->ID) .'">' . $this_page->post_title . '</a>'; | |
$pagelist .= '<ul>' . $children . '</ul>'; | |
$pagelist .= '</li>'; | |
} |
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 get_custom_excerpt($length) { | |
$excerpt = get_the_content(); | |
$excerpt = preg_replace(" (\[.*?\])",'',$excerpt); | |
$excerpt = strip_shortcodes($excerpt); | |
$excerpt = strip_tags($excerpt); | |
$excerpt = substr($excerpt, 0, $length); | |
$excerpt = substr($excerpt, 0, strripos($excerpt, " ")); | |
$excerpt = trim(preg_replace( '/\s+/', ' ', $excerpt)); | |
$excerpt = $excerpt.'...'; | |
return $excerpt; |
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_user_logged_in()) { | |
// do something | |
} else { | |
// do something else | |
} | |
?> |
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
<ul id="slider" class="row-fluid cycle-slideshow addShadow" data-cycle-slides="li" data-cycle-pause-on-hover="true" data-cycle-fx="scrollHorz" data-cycle-swipe="true"> | |
<div class="cycle-pager"></div> | |
<li class="cycle-slide"> | |
<a href="#"><img width="940" height="435" src="http://football.brett-marshall.com/assets/geno.jpg" class="attachment-slider_image wp-post-image" alt="geno"></a> | |
<div class="slide-content container"> | |
<div class="row-fluid"> | |
<div class="span12"> | |
<div class="row-fluid"> | |
<div class="span8"> | |
<h2><a href="#">Headline, QB Geno Smith?</a></h2> |
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
$.ajaxSetup({cache:false}); | |
$(document).on("click", ".resource-listing a.read-more", function(){ | |
if(Modernizr.history) { | |
var post_url = $(this).attr('href'); | |
var post = $('#main-content'); | |
post.html('<img src="/wp-content/themes/funding/assets/img/ajax-loader.gif" class="ajax-loader"/>'); /* shows ajax loader until content is loaded */ | |
post.load(post_url + ' #pull-this-content', function() { |
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
white-space: pre; | |
white-space: pre-wrap; | |
white-space: pre-line; | |
white-space: -pre-wrap; | |
white-space: -o-pre-wrap; | |
white-space: -moz-pre-wrap; | |
white-space: -hp-pre-wrap; | |
word-wrap: break-word; |
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 kct_page_css_class( $css_class, $page, $depth, $args, $current_page ) { | |
if ( !isset($args['post_type']) || !is_singular($args['post_type']) ) | |
return $css_class; | |
global $post; | |
$current_page = $post->ID; | |
$_current_page = $post; | |
_get_post_ancestors($_current_page); | |
if ( isset($_current_page->ancestors) && in_array($page->ID, (array) $_current_page->ancestors) ) |
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
.content { | |
display: -webkit-box; /* OLD - iOS 6-, Safari 3.1-6 */ | |
display: -moz-box; /* OLD - Firefox 19- (buggy but mostly works) */ | |
display: -ms-flexbox; /* TWEENER - IE 10 */ | |
display: -webkit-flex; /* NEW - Chrome */ | |
display: flex; | |
-webkit-flex-direction: column; | |
-moz-flex-direction: column; | |
-ms-flex-direction: column; | |
flex-direction: column; |
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 smooth = { | |
Scroll: function(item, speed) { | |
// when the item is clicked | |
item.click(function() { | |
// grab the html document and / or the body | |
$("html, body").animate({ | |
// grab the item clicked's href and get the distance between this element | |
//and the element it is scrolling to | |
scrollTop: $($(this).attr("href")).offset().top + "px" | |
}, { |
OlderNewer