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
<!-- Bottom or Top sticky share bar! Create by Cagri Uckan for sosyalio.com and uckan.net --> | |
<div class="so-sticky-share"> | |
<div class="container"> | |
<div class="row"> | |
<div class="so-sticky-share_container"> | |
<ul> | |
<li>Share</li> | |
<li class="so-fb"><a href="#">Facebook</a></li> | |
<li class="so-tw"><a href="#">Twitter</a></li> | |
<li class="so-ins"><a href="#">Instagram</a></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
/*Sticky Share*/ | |
.so-sticky-share.so-classname { | |
transform: translate3d(0,0px,0); | |
-webkit-transform: translate3d(0,0,0); | |
} | |
.so-sticky-share { | |
position: fixed; | |
bottom: 0; | |
-webkit-transition: opacity 0.35s, -webkit-transform 0.35s; | |
-webkit-transform: translate3d(0,0px,0); |
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 lastScrollTop = 0; | |
$(window).scroll(function(event){ | |
var st = $(this).scrollTop(); | |
if (st > lastScrollTop){ | |
// downscroll code | |
$('.so-sticky-share').addClass('so-classname'); | |
} else { | |
// upscroll code | |
$('.so-sticky-share').removeClass('so-classname'); | |
} |
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 | |
/* | |
Author: uckannet | |
Link: http://www.uckan.net/2017/01/23/wordpress-spotify-da-dinlediginiz-sarkiyi-bilesen-olarak-sitenizde-gosterin | |
*/ | |
if(function_exists('register_sidebar')) { | |
register_sidebar(array( | |
'name' => 'Sidebar', /* optionally change */ | |
'before_widget' => '<aside id="%1$s" class="widgets %2$s">', |
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 | |
/* | |
Author: uckannet | |
Link: http://www.uckan.net/2017/01/23/wordpress-spotify-da-dinlediginiz-sarkiyi-bilesen-olarak-sitenizde-gosterin | |
create by: http://jonmasterson.com/build-your-own-spotify-widget-for-wordpress/ | |
*/ | |
class SH_Music extends WP_Widget { | |
public function __construct() { |
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 | |
/** | |
* @link http://www.uckan.net/2017/02/08/wordpress-son-guncellenen-yazilari-listeleme/ | |
* @package WordPress | |
* @uckannet | |
**/ | |
function last_updated_posts () { | |
$args = array( | |
'ignore_sticky_posts' => '1', |
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 | |
<!-- Begin --> | |
add_theme_support('post-thumbnails'); | |
if ( function_exists( 'add_image_size' ) ){ | |
add_image_size( 'uckan-small' ,190, 120, true ); | |
} | |
<!-- End --> | |
?> |
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 | |
/** | |
* @link http://www.uckan.net/2017/03/31/wordpresste-shortcode-ile-yazi-icerisinde-benzer-yazi-gosterme/ | |
* @html http://codepen.io/uckannet/pen/OprjVz | |
* @package WordPress | |
* @author Cagri Uckan / uckan.net | |
**/ | |
function uckan_related_post_shortcode($atts){ | |
extract(shortcode_atts(array( | |
"id" => '', |
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 url_get_image_id($image_url) { | |
global $wpdb; | |
$attachment = $wpdb->get_col($wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE guid='%s';", $image_url )); | |
return $attachment[0]; | |
} | |
function uckan_get_thumbnail($size, $type) { | |
global $post; |
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
add_action('after_setup_theme', 'uckan_create_pages'); | |
function uckan_create_pages(){ | |
$awesome_page_id = get_option("awesome_page_id"); | |
if (!$awesome_page_id) { | |
$post1 = array( | |
'post_title' => "Sayfa Adınız!", | |
'post_content' => "", | |
'post_status' => "publish", | |
'post_type' => 'page', | |
); |