Skip to content

Instantly share code, notes, and snippets.

@tenman
tenman / functions.php
Created February 13, 2014 09:44
comment link at posted_in for Raindrops theme
<?php
add_filter( 'raindrops_posted_in', 'my_add_comments' );
function my_add_comments( $posted_in ) {
return $posted_in. raindrops_comments_link();
}
function raindrops_comments_link() {
@tenman
tenman / test.php
Created February 14, 2014 00:05
Raindrops grid post layout example
<?php
/*
* Template Name: test
*/
if ( ! defined( 'ABSPATH' ) ) { exit; }
global $rsidebar_show, $raindrops_document_type;
get_header( $raindrops_document_type );
do_action( 'raindrops_pre_'.basename( __FILE__) );
raindrops_debug_navitation( __FILE__ );
?>
@tenman
tenman / gist:9061406
Created February 17, 2014 23:29
using anchor points with Raindrops Theme
<h2>Select Box</h2>
<div class="color-3 pad-m corner">
<form>
<select onChange="top.location.href=value">
<option value="http://tenman.info/labo/snip/archives/4577#first">first</option><option value="http://tenman.info/labo/snip/archives/4577#second">second</option><option value="http://tenman.info/labo/snip/archives/4577#third">third</option>
</select>
</form>
</div>
<h2 id="first">First</h2>
@tenman
tenman / test.html
Created February 19, 2014 00:29
soft hyphen and wbr element
<h3>soft hyphen</h3>
a&shy;b&shy;c&shy;d&shy;e&shy;f&shy;g&shy;h&shy;i&shy;j&shy;k&shy;l&shy;m&shy;n&shy;o&shy;p&shy;q&shy;r&shy;s&shy;t&shy;u&shy;v&shy;w&shy;x&shy;y&shy;z&shy;a&shy;b&shy;c&shy;d&shy;e&shy;f&shy;g&shy;h&shy;i&shy;j&shy;k&shy;l&shy;m&shy;n&shy;o&shy;p&shy;q&shy;r&shy;s&shy;t&shy;u&shy;v&shy;w&shy;x&shy;y&shy;z&shy;a&shy;b&shy;c&shy;d&shy;e&shy;f&shy;g&shy;h&shy;i&shy;j&shy;k&shy;l&shy;m&shy;n&shy;o&shy;p&shy;q&shy;r&shy;s&shy;t&shy;u&shy;v&shy;w&shy;x&shy;y&shy;z&shy;a&shy;b&shy;c&shy;d&shy;e&shy;f&shy;g&shy;h&shy;i&shy;j&shy;k&shy;l&shy;m&shy;n&shy;o&shy;p&shy;q&shy;r&shy;s&shy;t&shy;u&shy;v&shy;w&shy;x&shy;y&shy;z&shy;a&shy;b&shy;c&shy;d&shy;e&shy;f&shy;g&shy;h&shy;i&shy;j&shy;k&shy;l&shy;m&shy;n&shy;o&shy;p&shy;q&shy;r&shy;s&shy;t&shy;u&shy;v&shy;w&shy;x&shy;y&shy;z&shy;
<h3>wbr element</h3>
a<wbr />b<wbr />c<wbr />d<wbr />e<wbr />f<wbr />g<wbr />h<wbr />i<wbr />j<wbr />k<wbr />l<wbr />m<wbr />n<wbr />o<wbr />p<wbr />q<wbr />r<wbr />s<wbr />t<wbr />u<wbr />v<wbr />w<wbr />x<wbr />y<wbr /
@tenman
tenman / genericons.css
Created February 26, 2014 09:40
Enough theme Quick Fix: echough / genericons / genericons.css
/**
Genericons Helper CSS
*/
/**
* The font was graciously generated by Font Squirrel (http://www.fontsquirrel.com). We love those guys.
*/
@tenman
tenman / test.php
Last active August 29, 2015 13:56
Raindrops template shows category name and post links
<?php
/*
* Template Name: test
*/
get_header('html5');
?><div style="margin:5%;-moz-columns: 15em auto;-webkit-columns:15em auto;-o-columns: 15em auto;-ms-columns: 15em auto;">
<?php
$categories = get_all_category_ids();
@tenman
tenman / functions.php
Created March 5, 2014 05:02
WordPress theme Raindrops wp_nav_menu() show allways fixed page top.
<?php
/**
* Menu fixed
*
*
*
*/
define('NOBITA_QUERY', 'nobita_fixed_menu' );
define('NOBITA_VALUE_TYPE', 'js'); //または、css
@tenman
tenman / functions.php
Created March 8, 2014 23:30
Go to Top and Menu Fixed functionality at Raindrops WordPress Theme
<?php
/**
* Menu fixed
*
*
*
*/
define('NOBITA_QUERY', 'nobita_fixed_menu' );
define('NOBITA_VALUE_TYPE', 'js'); //or css
@tenman
tenman / loop.php
Created March 25, 2014 02:06
Raindrops child theme loop.php for test
<?php
/**
* Template for display loops.
*
* @package Raindrops
* @since Raindrops 0.1
*/
if ( ! defined( 'ABSPATH' ) ) { exit; }
?>
<?php
@tenman
tenman / functions.php
Last active August 29, 2015 14:01
Add description and keyword
<?php
/* サイトキーワード と概要 */
add_filter( 'the_generator', 'generator2description' );
function generator2description( $content ) {
global $post;
$result = '';
if ( is_front_page() || is_home() ) {
$result .= $content . "\n";