#PHP
add_action('blocktype_append_header_layer','my_blocktype_append_header_layer');
function my_blocktype_append_header_layer(){
echo '<div class="custom-layer"><a href="#" class="skin-button">Link added to header</a></div>';
}
| <?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'; |
| <?php | |
| /** | |
| * category posts | |
| * | |
| * | |
| * | |
| * | |
| */ | |
| function raindrops_category_posts( $args = '' ) { |
| 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 ) { |
| <?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; |
| <?php | |
| /* サイトキーワード と概要 */ | |
| add_filter( 'the_generator', 'generator2description' ); | |
| function generator2description( $content ) { | |
| global $post; | |
| $result = ''; | |
| if ( is_front_page() || is_home() ) { | |
| $result .= $content . "\n"; |
| <?php | |
| /** | |
| * Template for display loops. | |
| * | |
| * @package Raindrops | |
| * @since Raindrops 0.1 | |
| */ | |
| if ( ! defined( 'ABSPATH' ) ) { exit; } | |
| ?> | |
| <?php |
| <?php | |
| /** | |
| * Menu fixed | |
| * | |
| * | |
| * | |
| */ | |
| define('NOBITA_QUERY', 'nobita_fixed_menu' ); | |
| define('NOBITA_VALUE_TYPE', 'js'); //or css |
| <?php | |
| /** | |
| * Menu fixed | |
| * | |
| * | |
| * | |
| */ | |
| define('NOBITA_QUERY', 'nobita_fixed_menu' ); | |
| define('NOBITA_VALUE_TYPE', 'js'); //または、css |
| <?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(); |