Skip to content

Instantly share code, notes, and snippets.

View samikeijonen's full-sized avatar
🏠
Working from home

Sami Keijonen samikeijonen

🏠
Working from home
View GitHub Profile
@samikeijonen
samikeijonen / gist:3048693
Created July 4, 2012 18:12
Filter Origin byline
add_filter( 'origin_byline', 'my_byline' );
function my_byline( $byline ) {
$byline = '<div class="byline">' . __( 'Article by [entry-author] - [entry-comments-link]', 'origin' ) . '</div>';
return $byline;
}
@samikeijonen
samikeijonen / page-template-bloghatchpro.php
Created July 25, 2012 19:15
Hatch Pro Blog Template
<?php
/**
* Template Name: blog
*
* A custom page template for displaying blog archives.
*
* @package Hatch Pro
* @subpackage Template
*/
@samikeijonen
samikeijonen / remove between categories
Created August 8, 2012 12:29
Oxygen: filter byline remove , between categories
/* Filter bylines. */
add_filter( 'oxygen_byline', 'my_byline' );
add_filter( 'oxygen_byline_category', 'my_byline_category' );
function my_byline( $byline ) {
$byline = '<div class="byline">' . __( '[entry-published] &middot; by [entry-author] &middot; in [entry-terms taxonomy="category" separator=" "] [entry-edit-link before=" &middot; "]', 'oxygen' ) . '</div>' ;
return $byline;
@samikeijonen
samikeijonen / gist:3798996
Created September 28, 2012 10:09
Florence Child functions.php with HTML5 shiv
<?php
/**
* @package Florence Child
* @subpackage Functions
* @version 0.1
* @author Galin Simeonov
* @link http://devpress.com
* @license http://www.gnu.org/licenses/gpl-2.0.html
*/
<!DOCTYPE html>
<html>
<head>
<title>Lomake</title>
</head>
<body>
<h1>Lomake</h1>
@samikeijonen
samikeijonen / gist:3986527
Created October 31, 2012 11:21
Tehtävä 1
<!DOCTYPE html>
<html>
<head>
<title>Keskiarvo</title>
</head>
<body>
<h1>Keskiarvo</h1>
@samikeijonen
samikeijonen / gist:4044704
Created November 9, 2012 09:18
Sami keijonen: Tehtävä 1
<!DOCTYPE html>
<html>
<head>
<title>Silmukat</title>
</head>
<body>
<h1>Silmukkarakenteet</h1>
@samikeijonen
samikeijonen / Social Path
Created December 15, 2012 10:05
Use this code to use Social Path code in theme template file.
if ( function_exists( 'social_path_media' ) )
social_path_media();
@samikeijonen
samikeijonen / kultalusikka_front_page.php
Created December 16, 2012 14:04
Show downloads only from 'themes' category. Taxonomy is called 'download_category'.
<?php
/* Show downloads only from 'themes' category. Taxonomy is called 'download_category'. */
add_filter( 'kultalusikka_front_page_download_arguments', 'my_front_page_arguments' );
function my_front_page_arguments( $download_args ) {
$download_args['tax_query'] = array(
array(
'taxonomy' => 'download_category',
'field' => 'slug',
@samikeijonen
samikeijonen / edd_license_functions.php
Created December 19, 2012 11:25
EDD license in functions.php inside setup function.
<?php
/* Add theme settings. */
if ( is_admin() )
require_once( trailingslashit ( get_template_directory() ) . 'admin/functions-admin.php' );
/* Set up Licence key for this theme. URL: https://easydigitaldownloads.com/docs/activating-license-keys-in-wp-plugins-and-themes */
// this is the URL our updater / license checker pings. This should be the URL of the site with EDD installed.
define( 'KULTALUSIKKA_SL_STORE_URL', 'http://localhost/foxnet-themes-shop' ); // add your own unique prefix to prevent conflicts