Skip to content

Instantly share code, notes, and snippets.

@tenman
tenman / gist:6678806
Created September 24, 2013 00:20
part.php next previus link position change from content after to content before.
<?php
/**
* Template part file part
*
* @package Raindrops
* @since Raindrops 0.940
*
*/
$format = get_post_format( );
@tenman
tenman / gist:6447226
Created September 5, 2013 08:00
custom header.php header image right side.
<!DOCTYPE html>
<html <?php language_attributes( ); ?>>
<head>
<meta http-equiv="content-type" content="<?php bloginfo( 'html_type' );?>; charset=<?php bloginfo( 'charset' ); ?>" />
<title><?php wp_title( '|', true, 'right' ); ?></title>
<!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<?php
global $raindrops_link_unique_text;
@tenman
tenman / gist:6373691
Created August 29, 2013 02:37
このファイルは、個別のテーマやプラグインファイルの簡単な検査と、それぞれのファイルで使用されているMD5_FILEの値を計算し配列として表示します。 表示された配列を、テーマやプラグインディレクトリに、check-same.phpという名前で表示すると、次回から現在のMD5_FILEと記録されたMD5_FILEと比較して、ファイルに変更があったかどうかを表示する事が出来ます。
<?php
/*
File Name: detect-bom.php
Description: WordPressのインストールディレクトリに配置する事で、テーマ、プラグインの簡易的な検査と、それぞれのテーマやテンプレートファイルで使われているファイルのMD5_FILEを、表示します。テーマやプラグインのルートディレクトリにcheck-same.phpとして表示された配列をphpとしてペーストしておくと、次回の検査で、check-same.php配置後に変更されたテーマやテンプレートの同一性をチェックする事ができます。
Author: Tenman
Author URI: http://www.tenman.info/
Version: 0.1
License: GNU General Public License v2.0
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/
@tenman
tenman / gist:5905479
Created July 1, 2013 23:15
Raindrops simple home page template filename: home.php
<?php
get_header( $raindrops_document_type );
raindrops_debug_navitation( __FILE__ );
?>
<div id="yui-main">
<div class="yui-b">
<?php
if ( is_home( ) and is_active_sidebar( 'sidebar-3' ) ) {
echo '<div class="topsidebar">'."\n".'<ul>';
@tenman
tenman / gist:5545822
Last active December 17, 2015 03:48
Quick Fix Raindrops Theme for ver 1.113
/**
* Management of uninstall and install.
*
*
*
* ver 1.114 Theme data automatic change is supported at the time of site change.
*/
if ( ! function_exists( "raindrops_install_navigation" ) ) {
@tenman
tenman / gist:5439840
Created April 23, 2013 00:31
Coraline 2col page template
<?php
/**
* Template Name: 2column
* Custom page template.
* @package Coraline
* @since Coraline 1.0
*/
get_header(); ?>
<div id="content-container" >
@tenman
tenman / gist:5380345
Created April 13, 2013 22:23
WodPress theme Raindrops nav menu centerd
#access{
/* need config manuary */
height:3em;
margin-bottom:2em;
}
.menu-header {
position: relative;
overflow: hidden;
}
@tenman
tenman / list_of_post.php
Last active December 15, 2015 15:39
All posts of list page for Raindrops theme @ WordPress
<?php
/*
Template Name: list of post
*/
add_action("wp_head","raindrops_snap");
function raindrops_snap(){
$js =<<<JS
@tenman
tenman / gist:5022864
Last active December 14, 2015 03:39
2012 2 15 編集しなおすと、行間隔が、強制的に修正されるので、新規作成時は、ビジュアルモードで開けるけど、保存した場合は、エディタが、自動的に、htmlモードでしか開かなくなるものを作ってみました。
<?php
/*
Script Name: Force Break2
Author: Tenman
Author URI: http://www.tenman.info/
Version: 0.3
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/
add_filter( 'wp_insert_post_data' , 'nobita_extend_break' , '9999' );
@tenman
tenman / gist:4759947
Last active December 12, 2015 10:29
WordPress Theme Raindrops 1.008 has bug Please replace raindrops_small_device_helper function
/*
* Raindrops 1.008 can not remove custom header image.
*
* WordPress Theme Raindrops 1.008 has bug Please replace raindrops_small_device_helper function
* functions.php
*/
if ( ! function_exists( 'raindrops_small_device_helper' ) ) {
function raindrops_small_device_helper(){