Skip to content

Instantly share code, notes, and snippets.

@nagai113
nagai113 / portfolio
Created July 19, 2013 10:40
shigaakihito.comのworksについて
portfolioプラグインのスラッグを書き換えて、
固定ページ「works」にportfolioに投稿した内容を強引に表示させる。
$labels = array(
'name' => __( 'Works', 'portfolioposttype' ),//この行
'singular_name' => __( 'Portfolio Item', 'portfolioposttype' ),
'add_new' => __( 'Add New Item', 'portfolioposttype' ),
'add_new_item' => __( 'Add New Portfolio Item', 'portfolioposttype' ),
'edit_item' => __( 'Edit Portfolio Item', 'portfolioposttype' ),
'new_item' => __( 'Add New Portfolio Item', 'portfolioposttype' ),
@nagai113
nagai113 / js debug
Created June 28, 2013 09:59
js debug
console.log(cat_id);
//jsデバッグ用コード
@nagai113
nagai113 / gist:4986056
Created February 19, 2013 13:48
リストの丸いマークの削除
<ul style="list-style:none">
<li>項目1行目</li>
<li>項目2行目</li>
</ul>
@nagai113
nagai113 / gist:4986044
Created February 19, 2013 13:47
wordperss※特定のカテゴリーの記事のタイトルと日付のみ表示
<ul>
<?php query_posts('posts_per_page=5&order=desc&cat=カテゴリーID'); ?>
<?php while (have_posts()) : the_post(); ?>
<li><span class="date"><?php the_time('Y.m.d') ?></span><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></li>
<?php endwhile;wp_reset_query(); ?>
</ul>
@nagai113
nagai113 / gist:4986031
Created February 19, 2013 13:45
wordpress※特定のカテゴリーのみ新着記事にコンテンツの一部表示
<?php query_posts('posts_per_page=5&order=desc&cat=カテゴリーID'); ?>
<?php while (have_posts()) : the_post(); ?>
<h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
<?php the_content(); ?>
<?php endwhile;wp_reset_query(); ?>
@nagai113
nagai113 / Twitterウィジェットの言語変更
Last active December 11, 2015 07:08
Twitterウィジェットについて
<a class="twitter-timeline" href="https://twitter.com/fncmusicjapan" data-widget-id="xxxxxxxxx" width="250" height="250" lang="EN">@nagai113</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
Twitterのハッシュタグの言語を切り替えるには、 lang="EN"などを追加すればいい。
@nagai113
nagai113 / html直接リンク色変更
Last active December 10, 2015 21:59
html直接リンク色変更
<a href="#" style="color:#eb6a0f; text-decoration:none;">あああああああ</a>
@nagai113
nagai113 / cssでの一部リンク色変更
Last active December 10, 2015 21:59
cssでの一部リンク色変更
#header {
background:url(../../../../../) repeat;
margin-bottom:10px;
width:100%;
min-width:950px;
}
#header #headerInner {
width:930px;
margin:0 auto;
overflow:hidden;
@nagai113
nagai113 / youtubeのロゴ
Last active October 12, 2015 07:37
youtubelogo のロゴ
<div align="center"><iframe width="380" height="210" src="http://www.youtube.com/embed/xxxxxxxxxxxxxxxxxxxxxxxxx=1&rel=0" frameborder="0" allowfullscreen></iframe>
</div>
@nagai113
nagai113 / html空白.html
Last active October 11, 2015 15:17
html空白
&nbsp;