Skip to content

Instantly share code, notes, and snippets.

<?php query_posts('showposts=6'); ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
<?php the_date('Y年m月d日(D) h:i:s'); ?></li>
<?php endwhile; endif; ?>
<?php wp_reset_query(); ?>
//カテゴリーごとに新着エントリー表示(カテゴリー3の最新エントリー10件を表示
<ul class="qa1_list">
<?php
if(have_posts()): while(have_posts()): the_post();?>
<h2><?php the_title(); ?></h2>
<?php the_content(); ?>
<?php endwhile; endif; ?>
<?php bloginfo('description'); ?> //説明表示
<?php the_content(); ?> //投稿内容を表示させる
<?php the_excerpt(); ?> //記事の抜粋110文字
<?php the_title(); ?> //記事のタイトル
<?php the_permalink(); ?> //記事のURL
<?php the_date(); ?> //記事の投稿日時(投稿日が重複してる場合は最初の1記事のみ)
<?php the_time(); ?> //記事の投稿日時
<?php the_author(); ?> //記事の投稿者名
<?php the_author_posts_link(); ?> //記事の投稿者名とリンクを出力
<?php the_category(); ?> //記事のカテゴリー名とリンクを出力
<title><?php wp_title('|', true, 'right'); ?><?php bloginfo('name'); ?></title>
<?php $today=date('Y/n/j'); echo'last post '.$today; ?>
<?php $nameran=array('ぐー','ちょき','ぱー'); $numa=wp_rand( 0, 2 ); echo '<p>'.$nameran[$numa].'</p>';?>
@maco1028
maco1028 / water_shader1.cs
Created September 24, 2018 05:49
水のシェーダー #unity #shader
Shader "Custom/Ice"
{
Properties
{
_RampTex("Ramp", 2D) = "white" {}
_BumpTex("Bump", 2D) = "white" {}
_BumpRamp("Bump Ramp", 2D) = "white" {}
_Color("Color", Color) = (1, 1, 1, 1)
_EdgeThickness("Silouette Dropoff Rate", float) = 1.0
_DistortStrength("Distort Strength", float) = 1.0
@maco1028
maco1028 / blendshape.cs
Created June 7, 2018 15:26
ブレンドシェイプアニメーション #unity
public SkinnedMeshRenderer skinnedMeshRenderer;
void Start () {
skinnedMeshRenderer = GetComponent<SkinnedMeshRenderer> ();
}
void Update () {
float value = 50.0f + 50.0f * Mathf.Sin (Time.time);
skinnedMeshRenderer.SetBlendShapeWeight (0, value);
}
@maco1028
maco1028 / index.html
Last active September 9, 2017 16:53
Html基本
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>サンプルページ</title>
</head>
<body>
<!-- header -->
<header>
@maco1028
maco1028 / itween.cs
Last active September 9, 2017 17:12
iTween標準 #unity
【●秒かけて値を●~●まで変化させる】
//2秒かけて値を0~100まで変化させる。
iTween.ValueTo(gameObject, iTween.Hash("from", 0 "to", 100.0f, "time", 2.0f, "onupdate", "ValueChange"));
//完了したら
void ValueChange(float value){
Debug.Log(value);
}
【iTweenを連続で処理する】(delayを追加するといい)