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 hck_filter_taxonomy_archives( $query_args, $sfid ) { | |
if( $sfid == 509 ) { | |
$query_args['post_type'] = 'articles'; | |
} | |
return $query_args; | |
} |
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 feedFilter($query) { | |
if ($query->is_feed) { | |
add_filter('rss2_item', 'feedContentFilter'); | |
} | |
return $query; | |
} | |
add_filter('pre_get_posts','feedFilter'); | |
function feedContentFilter($item) { | |
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 jQuery plugin to enable the text ellipsis in firefox. | |
// see http://yue.st/notes/code/js/ellipsis.en.html | |
// usage: | |
// $('.elementsNeedEllipsis').ellipsis(); | |
// the elements should be block level ('display: block' or 'display: inline-block') | |
// | |
// I think you should take care of resize event by yourself, | |
// just call $('.elem').ellipsis() again after element resized. | |
$.fn.ellipsis = function () { | |
$(this).css({'white-space': 'nowrap', 'overflow': 'hidden'}); |