Skip to content

Instantly share code, notes, and snippets.

@setola
setola / index.html
Created June 11, 2012 22:53
CSS gradient border
<style>
.inner,.wrapper:hover {
background: #e2017b;
background: -moz-linear-gradient(top, #e2017b 0%, #640037 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #e2017b), color-stop(100%, #640037) );
background: -webkit-linear-gradient(top, #e2017b 0%, #640037 100%);
background: -o-linear-gradient(top, #e2017b 0%, #640037 100%);
background: -ms-linear-gradient(top, #e2017b 0%, #640037 100%);
background: linear-gradient(top, #e2017b 0%, #640037 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e2017b', endColorstr='#640037', GradientType=0 );
@setola
setola / portfolio-post.php
Created June 6, 2012 23:32
Trick to have the 'Portfolio' entry into the breadcrumbs
<?php
/**
* Trick to have the 'Portfolio' entry into the breadcrumbs
*/
global $portfolio_id;
$portfolio_id = 165;
add_filter('wp_seo_get_bc_ancestors', 'add_portfolio_taxonomy', 10, 1);
function add_portfolio_taxonomy($ancestors){
global $portfolio_id;
$ancestors[] = $portfolio_id;
@setola
setola / functions.php
Created May 21, 2012 23:19
A simple way to manage a slideshow with WordPress
<?php
add_theme_support('post-thumbnails');
add_image_size('slideshow-mini', 870, 500, true);
@setola
setola / tilesloaded.js
Created May 8, 2012 22:18
Gmaps - cutted baloon
google.maps.event.addListener(map, 'tilesloaded', function() {
infowindow.open(map,marker);
});
@setola
setola / merge_images.php
Created May 5, 2012 18:56
Slideshow: One big image for all
<?php
function merge_images($images, $config=null){
if(empty($images)) return 'No images';
$config = array_merge(
array(
'w' => '700',
'h' => '370',
'q' => '50',
'r' => false