This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Template Name: Archive Page */ | |
?> | |
<?php | |
$paged = (int) get_query_var('paged'); | |
$args = array( | |
'posts_per_page' => 3, | |
'paged' => $paged, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function nav_menu_class_customize($sorted_menu_items) { | |
foreach ($sorted_menu_items as $sorted_menu_item) { | |
// if menu item is a post type object (is not an archive or custom) | |
if ($sorted_menu_item->type == 'post_type') { | |
// get post object from object id | |
$post_obj = get_post($sorted_menu_item->object_id); | |
// rules | |
if ($post_obj->post_name == 'hoge') { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'wp_enqueue_scripts', 'wps_enqueue_lt_ie9' ); | |
/** | |
* Conditionally Enqueue Script for IE browsers less than IE 9 | |
* | |
* @link http://php.net/manual/en/function.version-compare.php | |
* @uses wp_check_browser_version() | |
*/ | |
function wps_enqueue_lt_ie9() { | |
global $is_IE; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* WordPress Query Comprehensive Reference | |
* Compiled by luetkemj - luetkemj.com | |
* Japanese translated by hissy | |
* | |
* CODEX: http://wpdocs.sourceforge.jp/%E9%96%A2%E6%95%B0%E3%83%AA%E3%83%95%E3%82%A1%E3%83%AC%E3%83%B3%E3%82%B9/WP_Query#.E3.83.91.E3.83.A9.E3.83.A1.E3.83.BC.E3.82.BF | |
* Source: https://core.trac.wordpress.org/browser/tags/3.9/src/wp-includes/query.php | |
* Original: https://gist.github.com/luetkemj/2023628/9e911982440141a13cb1dd8ba1ad6b35cd7bbdd7 | |
*/ |