Skip to content

Instantly share code, notes, and snippets.

@mypacecreator
mypacecreator / private-debug-log.php
Created December 20, 2018 02:28 — forked from webaware/private-debug-log.php
Enable WordPress debug log to a private folder not accessible from the web. See http://wordpress.stackexchange.com/q/84132/24260 for details and motivations. NB: currently needs to be manually edited to specify the private folder path;
<?php
/*
Plugin Name: Private Debug Log
Description: Enable debug log to a private folder not accessible from the web
Version: 0.0.1
Author: WebAware
Author URI: http://www.webaware.com.au/
*/
/*
@mypacecreator
mypacecreator / mtk
Last active July 30, 2018 10:36 — forked from ysugimoto/mtk
mtkするやつ
#!/bin/sh
echo '玉子とじラーメン 730円(大盛900円)'
echo '玉子とじ担々麺 850円(大盛1030円)'
echo 'もやし麺 850円(大盛1030円)'
echo 'ワンタン麺 850円(大盛1030円)'
echo '叉焼麺 850円(大盛1030円)'
echo '天津麺 850円(大盛1030円)'
echo '五目麺 850円(大盛1030円)'
echo '替玉 180円'
@mypacecreator
mypacecreator / refine-search-checkbox.php
Created January 15, 2018 11:47 — forked from yujiokayama/refine-search-checkbox.php
カスタム投稿タイプのカスタムタクソノミー(タグ)をチェックボックスで絞り込み検索
<!--カスタム投稿のタグをチェックボックスで絞り込み-->
<form method="get" id="searchform" action="<?php bloginfo('url'); ?>">
<label for="s" class="assistive-text">検索</label>
<h2>タグまたはカスタムタクソノミー</h2>
<?php
$taxonomy_name = 'cpt_tag';
$taxonomys = get_terms($taxonomy_name);
if(!is_wp_error($taxonomys) && count($taxonomys)):
foreach($taxonomys as $taxonomy):
$tax_posts = get_posts(array('post_type' => get_post_type('cpttype'), 'taxonomy' => $taxonomy_name, 'term' => $taxonomy->slug ) );