Skip to content

Instantly share code, notes, and snippets.

tenman tenman

Block or report user

Report or block tenman

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View add-link-on-header.markdown
@tenman
tenman / functions.php
Last active Nov 20, 2015
WordPress Raindrops Theme. Featured icon size chenge. on index,archives. paste only between code paste start and code paste end. ver 1.336 after.
View functions.php
<?php
// code paste start
add_image_size( 'archive_featured_icon', 100, 50, true );// 100 is width(px) 50 is height(px)
add_filter('raindrops_post_thumbnail_size_main_query','my_post_thumbnail_size_custom' );
add_filter('raindrops_embed_meta_css', 'my_archive_thumbnail_size_custom_style' );
function my_post_thumbnail_size_custom( $size ) {
return 'archive_featured_icon';
@tenman
tenman / functions.php
Created Jun 4, 2014
Quick Fix Raindrops theme bug. add to functions.php first line(<?php before ) below codes
View functions.php
<?php
/**
* category posts
*
*
*
*
*/
function raindrops_category_posts( $args = '' ) {
@tenman
tenman / functions.php
Last active Aug 29, 2015
show all category posts
View functions.php
function raindrops_category_id2name( $str ) {
$id = ( int ) $str;
return get_cat_name( $id );
}
function raindrops_reset_val( $str ) {
return 0;
}
function compare_capital_lower_not_distinguish( $a, $b ) {
@tenman
tenman / home.php
Created May 16, 2014
recent posts each categories
View home.php
<?php
/* カテゴリIDをキーとした配列の作成 */
$category_ids = array_flip( get_all_category_ids() );
$category_ids = array_map( "reset_val", $category_ids );
/* 表示する投稿の件数(最大) */
$limit_posts = 5;
function reset_val( $str ) {
return 0;
@tenman
tenman / functions.php
Last active Aug 29, 2015
Add description and keyword
View functions.php
<?php
/* サイトキーワード と概要 */
add_filter( 'the_generator', 'generator2description' );
function generator2description( $content ) {
global $post;
$result = '';
if ( is_front_page() || is_home() ) {
$result .= $content . "\n";
@tenman
tenman / loop.php
Created Mar 25, 2014
Raindrops child theme loop.php for test
View loop.php
<?php
/**
* Template for display loops.
*
* @package Raindrops
* @since Raindrops 0.1
*/
if ( ! defined( 'ABSPATH' ) ) { exit; }
?>
<?php
@tenman
tenman / functions.php
Created Mar 8, 2014
Go to Top and Menu Fixed functionality at Raindrops WordPress Theme
View functions.php
<?php
/**
* Menu fixed
*
*
*
*/
define('NOBITA_QUERY', 'nobita_fixed_menu' );
define('NOBITA_VALUE_TYPE', 'js'); //or css
@tenman
tenman / functions.php
Created Mar 5, 2014
WordPress theme Raindrops wp_nav_menu() show allways fixed page top.
View functions.php
<?php
/**
* Menu fixed
*
*
*
*/
define('NOBITA_QUERY', 'nobita_fixed_menu' );
define('NOBITA_VALUE_TYPE', 'js'); //または、css
@tenman
tenman / test.php
Last active Aug 29, 2015
Raindrops template shows category name and post links
View test.php
<?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();
You can’t perform that action at this time.