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 | |
$show_thumb = get_post_meta(get_the_ID(), 'aq_format_0', TRUE); | |
$thumb = wp_get_attachment_url( get_post_thumbnail_id(),'full'); | |
$image = aq_resize( $thumb, 1000, 400, true ); | |
?> | |
<?php if ($show_thumb != 'no' && has_post_thumbnail() ) : ?> | |
<div class="post_image"> | |
<img src="<?php echo $image; ?>" alt=""> |
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 generate_options_css($newdata) { | |
/** Define some vars **/ | |
$data = $newdata; | |
$uploads = wp_upload_dir(); | |
$css_dir = get_template_directory() . '/css/'; // Shorten code, save 1 call | |
/** Save on different directory if on multisite **/ | |
if(is_multisite()) { | |
$aq_uploads_dir = trailingslashit($uploads['basedir']); |
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
/* | |
* Load More for Masonry modification | |
* | |
* Full post: | |
* http://www.billerickson.net/infinite-scroll-in-wordpress/ | |
* | |
*/ | |
jQuery(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
<?php | |
/** | |
* ----------------------------------------------------------------------------------------- | |
* Based on `https://github.com/mecha-cms/mecha-cms/blob/master/system/kernel/converter.php` | |
* ----------------------------------------------------------------------------------------- | |
*/ | |
// HTML Minifier | |
function minify_html($input) { |
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
/** | |
* Example use: | |
* $('div:icontains("Text in page")'); | |
* Will return jQuery object containing any/all of the following: | |
* <div>text in page</div> | |
* <div>TEXT in PAGE</div> | |
* <div>Text in page</div> | |
*/ | |
$.expr[':'].icontains = $.expr.createPseudo(function(text) { | |
return function(e) { |
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 loop returns all movies separated by genres they belong to | |
$post_type = 'brand'; | |
$tax = 'division'; | |
$tax_terms = get_terms($tax); | |
if ($tax_terms) { | |
foreach ($tax_terms as $tax_term) { | |
$args=array( |
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 | |
/** | |
* Infinite next and previous post looping in WordPress | |
*/ | |
$next_post = get_next_post(); | |
$previous_post = get_previous_post(); | |
$current_id = get_the_ID(); | |
// Get ID's of posts |