Skip to content

Instantly share code, notes, and snippets.

View puikinsh's full-sized avatar
☘️

Aigars Silkalns puikinsh

☘️
View GitHub Profile
@puikinsh
puikinsh / gist:9173749
Created February 23, 2014 16:37
Travelify footer copyright info without WordPress link
add_action( 'travelify_footer', 'travelify_footer_info', 30 );
/**
* function to show the footer info, copyright information
*/
function travelify_footer_info() {
$output = '<div class="copyright">'.__( 'Copyright &copy;', 'travelify' ).' '.'[the-year] [site-link]'.' '.__( 'Theme by', 'travelify' ).' '.'[th-link]'.'</div><!-- .copyright -->';
echo do_shortcode( $output );
}
@puikinsh
puikinsh / functions.min.js
Created April 6, 2014 06:56
Travelify slider function to stop slider at the end of slideshow
jQuery(window).load(function () {
var transition_effect = travelify_slider_value.transition_effect;
var transition_delay = travelify_slider_value.transition_delay;
var transition_duration = travelify_slider_value.transition_duration;
jQuery('.slider-cycle').cycle({
fx: transition_effect,
pager: '#controllers',
activePagerClass: 'active',
timeout: transition_delay,
speed: transition_duration,
@puikinsh
puikinsh / Google Adsense for Sparkling
Created April 26, 2014 11:48
Sparkling Theme JavaScript edit to fix problem with responsive Google Adsense units
// Bootstrap specific functions and styling
// first set the body to hide and show everything when fully loaded
jQuery(document.body).hide();
jQuery(document).ready(function(){
jQuery(".comment-reply-link").addClass("btn btn-sm btn-default");
jQuery("#submit").addClass("btn btn-default");
jQuery(".wpcf7-submit").addClass("btn btn-default");
jQuery(".wp-caption").addClass("thumbnail");
@puikinsh
puikinsh / gist:304c2b66089dfdb3612e
Last active August 29, 2015 14:01
Sparkling Slider customizations
I will leave this code here to avoid encoding issues you might face when copying from Gmail
You can create flexslider customizations by creating a new file in child theme and enqueue it like this:
add_action( 'wp_enqueue_scripts', 'sparkling_child_script' );
function sparkling_child_script() {
wp_enqueue_script( 'sparkling_child_slider', get_stylesheet_directory_uri() . '/js/newflex.js', array( 'jquery' ), '2.2.2', true );
}
@puikinsh
puikinsh / gist:bb8075a4d620d9082eda
Created November 26, 2014 15:10
This is a very basic example with just one paragraph and a link to the stylesheet.
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<p>
This is an amazing text because has a custom font.
</p>
</body>
@puikinsh
puikinsh / gist:27a978ea8be590a2196f
Last active August 29, 2015 14:10
Mobile first approach for font-family
p {
font-family: Arial,Helvetica,sans-serif;
}
@media only screen and (min-width: 980px) {
@font-face {
font-family: "OctinSports";
src: url("fonts/octinsports.eot");
src: url("fonts/octinsports.eot?#iefix") format("embedded-opentype"),
@puikinsh
puikinsh / gist:42cf58321088d8de7f84
Last active August 29, 2015 14:10
@font-face example OctinSports font
@font-face {
font-family: "OctinSports";
src: url("fonts/octinsports.eot");
src: url("fonts/octinsports.eot?#iefix") format("embedded-opentype"),
url("fonts/octinsports.woff") format("woff"),
url("fonts/octinsports.ttf") format("truetype"),
url("fonts/octinsports.svg#OctinSports") format("svg");
font-weight: normal;
font-style: normal;
}
@puikinsh
puikinsh / gist:e3f48844855a4bbe7f1d
Created November 26, 2014 15:19
IE Specific stylesheet
<!--[if IE]>
<link rel="stylesheet" href="css/fonts.min.css">
<![endif]-->
@puikinsh
puikinsh / gist:3506a8a7648a97b2a3ce
Last active August 29, 2015 14:10
Solving the Problem for Internet Explorer 10
<!--[if !IE]><!-->
<script>
if (Function('/*@cc_on return document.documentMode===10@*/')() && window.innerWidth >= 980) {
var link = document.createElement('link');
link.rel = 'stylesheet';
link.href = 'css/fonts.min.css';
document.getElementsByTagName('head')[0].appendChild(link);
}
<?php
function my_shortcode_function() {
$i = '<p>Hello World!</p>';
return $i;
}
add_shortcode('my-shortcode', 'my_shortcode_function');
?>