This file contains hidden or 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 | |
$right_arrow = "<img src=\"".$dir."/images/news/next_news.svg\" />"; | |
next_post_link('%link',$right_arrow); | |
?> |
This file contains hidden or 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 to rewrite the VIMEO YOUTUBE URL | |
function mod_url($url){ | |
$yt = strpos($url, 'youtube'); | |
$vim = strpos($url, 'vimeo'); | |
if($yt): | |
$url = str_replace("watch?v=","v/",$url); | |
endif; | |
if($vim): | |
$url = str_replace("vimeo.com","player.vimeo.com/video",$url); |
This file contains hidden or 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 cc_mime_types($mimes) { | |
$mimes['svg'] = 'image/svg+xml'; | |
return $mimes; | |
} | |
add_filter('upload_mimes', 'cc_mime_types'); | |
function fix_svg_thumb_display() { | |
echo ' | |
td.media-icon img[src$=".svg"], img[src$=".svg"].attachment-post-thumbnail { |
This file contains hidden or 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
// DRAG: | |
if (slider.vars.drag) { | |
slider.bind('udragstart.udrag', function(event) { | |
event.preventDefault(); | |
var target = (event.px_delta_x < 0) ? slider.getTarget('next') : slider.getTarget('prev'); | |
slider.flexAnimate(target, slider.vars.pauseOnAction); | |
}); | |
} |
This file contains hidden or 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
// This function returns the total amount of posts available after the current post. | |
function more_posts() { | |
global $wp_query; | |
return $wp_query->current_post + 1 < $wp_query->post_count; | |
} |
This file contains hidden or 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 | |
foreach ($network as $net) : | |
$hash = $net['current_tax']; | |
$continent_unique[$hash] = $net; | |
endforeach; | |
?> |
This file contains hidden or 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 add_custom_types_to_tax( $query ) { | |
if( is_category() || is_tag() && empty( $query->query_vars['suppress_filters'] ) ) { | |
// Get all your post types | |
$post_types = get_post_types(); | |
// $post_types = array( 'post', 'your_custom_type' ); | |
$query->set( 'post_type', $post_types ); | |
return $query; | |
} |
This file contains hidden or 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
.loopingClass (@index) when (@index > 0) { | |
.single-day:nth-child(@{index}){ background-color: darken(#96bbdd,@index*4) ;} | |
.loopingClass(@index - 1); | |
} | |
// end the loop when index is 0 | |
.loopingClass (0) {} | |
// "call" the loopingClass the first time with highest value | |
.loopingClass (@iterations); |
This file contains hidden or 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
CSS | |
.box{ | |
position: relative; | |
width: 50%; /* desired width */ | |
} | |
.box:before{ | |
content: ""; | |
display: block; | |
padding-top: 100%; /* initial ratio of 1:1*/ | |
} |
This file contains hidden or 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
$url = wp_get_attachment_url( get_post_thumbnail_id($post->ID) ); |