Skip to content

Instantly share code, notes, and snippets.

View cazuki's full-sized avatar

Cazuki Hoshina cazuki

View GitHub Profile
@cazuki
cazuki / wp-functions-rss-contents-insert.php
Last active August 29, 2015 14:25
WordPressのRSSに署名などのコンテンツを追加
// フィードにコンテンツを追加
function do_post_contents_feeds($content) {
global $post;
if(has_post_thumbnail($post->ID)) {
$content = '<div>' .get_the_post_thumbnail($post->ID). '</div>' .$content. '<div><a href="' .get_permalink($post->ID).'" target="_blank">この記事の続きを読む</a></div><div><a href="' .get_permalink($post->ID). '" target="_blank">' .get_the_title($post->ID). '</a> は <a href="http://example.jp/" target="_blank">ブログタイトル</a> の記事です</div>';
}
return $content;
}
add_filter('the_excerpt_rss', 'do_post_contents_feeds');
add_filter('the_content_feed', 'do_post_contents_feeds');
@cazuki
cazuki / yomereba-kaereba-responsive.css
Last active July 22, 2020 05:27
ヨメレバ/カエレバをレスポンシブで表示させるCSSです。
/* ===============消しちゃダメ============== */
/* kaereba/yomereba Customize Settings 1.0.0 ver */
/* Created by Cazuki Hoshina */
/* Copyright (c) @cazuki All rights Reserved. */
/* ======================================== */
.kaerebalink-box, .booklink-box {
width: 100%;
margin: 0 0 2rem;
padding: 1rem;