Commit 2bfe7446 by o.kimura

テーマ achievement 内ファイル最新を取得

parent 00a608bd
Showing with 1272 additions and 730 deletions
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset=UTF-8>
<title><?php bloginfo('name'); ?></title>
<meta http-equiv="refresh" content="0;URL=<?php echo home_url(); ?>">
</head>
<body>
&nbsp;
</body>
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset=UTF-8>
<title><?php bloginfo('name'); ?></title>
<meta http-equiv="refresh" content="0;URL=<?php echo home_url(); ?>">
</head>
<body>
&nbsp;
</body>
</html>
\ No newline at end of file
<?php include(get_template_directory() . '/assets/include/header.php'); ?>
<?php include(get_template_directory() . '/assets/include/footer.php'); ?>
\ No newline at end of file
<?php include(get_template_directory() . '/assets/include/header.php'); ?>
<?php include(get_template_directory() . '/assets/include/footer.php'); ?>
\ No newline at end of file
<?php
/* ===============================================================================
総合設定ファイル
=============================================================================== */
/* ディレクトリ設定
------------------------------------------------------------------------------- */
$templatepath = get_template_directory();
define('T_LIBS', $templatepath . '/libs/');
define('T_THEME', get_template_directory_uri());
/* カスタム投稿
------------------------------------------------------------------------------- */
add_action('init', 'create_post_type');
function create_post_type()
{
register_post_type('news', [ // 投稿タイプ名の定義
'labels' => [
'name' => 'ニュース', // 管理画面上で表示する投稿タイプ名
'singular_name' => 'news', // カスタム投稿の識別名
],
'public' => true, // 投稿タイプをpublicにするか
'has_archive' => true, // アーカイブ機能ON/OFF
'menu_position' => 4, // 管理画面上での配置場所
'show_in_rest' => true, // 5系から出てきた新エディタ「Gutenberg」を有効にする
'supports' => array('title', 'editor', 'thumbnail'),
'slug' => 'news',
'rewrite' => array('slug' => 'news', 'with_front' => false),
'taxonomy' => 'news_tax',
]);
$args = array(
'label' => __('カテゴリー', 'achievement'),
'public' => true,
'hierarchical' => true,
'rewrite' => array('slug' => 'news', 'with_front' => false),
);
register_taxonomy('news_tax', 'news', $args);
register_post_type('case', [
'labels' => [
'name' => 'お客様事例',
'singular_name' => 'case',
],
'public' => true,
'has_archive' => true,
'menu_position' => 3,
'show_in_rest' => true,
]);
$args = array(
'label' => __('カテゴリー', 'case'),
'public' => true,
'hierarchical' => true,
'rewrite' => array('slug' => 'case', 'with_front' => false),
);
register_taxonomy('case_tax', 'case', $args);
register_post_type('trainer', [
'labels' => [
'name' => '講師紹介',
'singular_name' => 'trainer',
],
'public' => true,
'has_archive' => true,
'menu_position' => 7,
'show_in_rest' => true,
]);
$args = array(
'label' => __('カテゴリー', 'trainer'),
'public' => true,
'hierarchical' => true,
'rewrite' => array('slug' => 'trainer', 'with_front' => false),
);
register_taxonomy('trainer_tax', 'trainer', $args);
register_post_type('experience', [
'labels' => [
'name' => '講演会',
'singular_name' => 'experience',
],
'public' => true,
'has_archive' => true,
'menu_position' => 8,
'show_in_rest' => true,
]);
$args = array(
'label' => __('カテゴリー', 'experience'),
'public' => true,
'hierarchical' => true,
'rewrite' => array('slug' => 'experience', 'with_front' => false),
);
register_taxonomy('experience_tax', 'experience', $args);
register_post_type('faq', [
'labels' => [
'name' => 'よくある質問',
'singular_name' => 'faq',
],
'public' => true,
'has_archive' => true,
'menu_position' => 9,
'show_in_rest' => true,
]);
$args = array(
'label' => __('カテゴリー', 'faq'),
'public' => true,
'hierarchical' => true,
'rewrite' => array('slug' => 'faq', 'with_front' => false),
);
register_taxonomy('faq_tax', 'faq', $args);
register_post_type('seminar', [
'labels' => [
'name' => 'セミナー',
'singular_name' => 'seminar',
],
'public' => true,
'has_archive' => true,
'menu_position' => 10,
'show_in_rest' => true,
]);
$args = array(
'label' => __('カテゴリー', 'seminar'),
'public' => true,
'hierarchical' => true,
'rewrite' => array('slug' => 'seminar', 'with_front' => false),
);
register_taxonomy('seminar_tax', 'seminar', $args);
}
add_theme_support('post-thumbnails');
set_post_thumbnail_size(600, 346, true);
/*【管理画面】ACF Options Page の設定 */
if( function_exists('acf_add_options_page') ) {
acf_add_options_page(array(
'page_title' => 'UpdateText', // ページタイトル
'menu_title' => '一括更新テキスト', // メニュータイトル
'menu_slug' => 'update-text', // メニュースラッグ
'capability' => 'edit_posts',
'redirect' => false
));
}
// 「講演会」本文エディタ削除
function my_remove_post_support() {
remove_post_type_support('experience','editor');
}
add_action('init','my_remove_post_support');
/*===================================
mark new post
===================================*/
function mark_new_post($days)
{
$today = date_i18n('U');
$entry_day = get_the_time('U');
$post_day = date('U', ($today - $entry_day)) / 86400;
if ($days > $post_day) :
echo '<p class="c-list1__tag"><span>会社情報</span></p>';
endif;
}
//auto check taxonomy custom post news
function mfields_set_default_object_terms($post_id, $post)
{
if ('publish' === $post->post_status && $post->post_type === 'news') {
$defaults = array(
'news_tax' => array('info')
);
$taxonomies = get_object_taxonomies($post->post_type);
foreach ((array) $taxonomies as $taxonomy) {
$terms = wp_get_post_terms($post_id, $taxonomy);
if (empty($terms) && array_key_exists($taxonomy, $defaults)) {
wp_set_object_terms($post_id, $defaults[$taxonomy], $taxonomy);
}
}
}
}
add_action('save_post', 'mfields_set_default_object_terms', 100, 2);
// function tax_news($termlink, $term, $taxonomy)
// {
// if ('news_tax' == $taxonomy)
// return home_url() . '/news/' . $term->slug;
// return $termlink;
// }
// add_filter('term_link', 'tax_news', 10, 3);
// add_filter('request', 'rudr_change_term_request', 1, 1);
// add_filter('term_link', 'rudr_term_permalink', 10, 3);
// function rudr_change_term_request($query)
// {
// $tax_name = 'news_tax';
// if ($query['attachment']) :
// $include_children = true;
// $name = $query['attachment'];
// else :
// $include_children = false;
// $name = $query['name'];
// endif;
// $term = get_term_by('slug', $name, $tax_name);
// if (isset($name) && $term && !is_wp_error($term)) :
// if ($include_children) {
// unset($query['attachment']);
// $parent = $term->parent;
// while ($parent) {
// $parent_term = get_term($parent, $tax_name);
// $name = $parent_term->slug . '/' . $name;
// $parent = $parent_term->parent;
// }
// } else {
// unset($query['name']);
// }
// endif;
// return $query;
// }
// function rudr_term_permalink($url, $term, $taxonomy)
// {
// $taxonomy_name = 'news_tax';
// $taxonomy_slug = 'news_tax';
// if (strpos($url, $taxonomy_slug) === FALSE || $taxonomy != $taxonomy_name) return $url;
// $url = str_replace('/' . $taxonomy_slug, '', $url);
// return $url;
// }
/*【管理画面】投稿メニューを非表示 */
function remove_menus()
{
global $menu;
remove_menu_page('edit.php');
}
add_action('admin_menu', 'remove_menus');
// Code viet lai rule cho taxonomy custom post type. Chỉ chạy 1 lần rồi xóa đi.
// Code rewrite rule for taxonomy custom post type. Only run 1 time and then delete.
function generate_taxonomy_rewrite_rules($wp_rewrite)
{
$rules = array();
$post_types = get_post_types(array('public' => true, '_builtin' => false), 'objects');
$taxonomies = get_taxonomies(array('public' => true, '_builtin' => false), 'objects');
foreach ($post_types as $post_type) {
$post_type_name = $post_type->name;
$post_type_slug = $post_type->rewrite['slug'];
foreach ($taxonomies as $taxonomy) {
if ($taxonomy->object_type[0] == $post_type_name) {
$terms = get_categories(array('type' => $post_type_name, 'taxonomy' => $taxonomy->name, 'hide_empty' => 0));
foreach ($terms as $term) {
$rules[$post_type_slug . '/' . $term->slug . '/?$'] = 'index.php?' . $term->taxonomy . '=' . $term->slug;
$rules[$post_type_slug . '/' . $term->slug . '/page/?([0-9]{1,})/?$'] = 'index.php?' . $term->taxonomy . '=' . $term->slug . '&paged=' . $wp_rewrite->preg_index(1);
}
}
}
}
$wp_rewrite->rules = $rules + $wp_rewrite->rules;
}
add_action('generate_rewrite_rules', 'generate_taxonomy_rewrite_rules');
<?php include(get_template_directory() . '/assets/include/header.php'); ?>
<?php the_title(); ?>
<?php the_time('Y.n.j'); ?>
<?php while (have_posts()){ the_post();the_content();} ?>
<?php include(get_template_directory() . '/assets/include/footer.php'); ?>
<?php include(get_template_directory() . '/assets/include/header.php'); ?>
<?php the_title(); ?>
<?php the_time('Y.n.j'); ?>
<?php while (have_posts()){ the_post();the_content();} ?>
<?php include(get_template_directory() . '/assets/include/footer.php'); ?>
<?php $pageid = "faq"; ?>
<?php include(get_template_directory() . '/assets/include/header.php'); ?>
<div class="page-other p-faq">
<div class="c-breadcrumb pc-only">
<ul class="c-breadcrumb__inner">
<?php if (function_exists('bcn_display')) {
bcn_display();
} ?>
</ul>
</div>
<section class="c-mainvisual p-other-mv">
<div class="c-mainvisual__inner">
<h2 class="c-mainvisual__ttl">よくある質問</h2>
</div>
</section>
<div class="container">
<aside class="side">
<div class="side__box">
<div class="search">
<form class="search__input">
<input type="text" name="search" placeholder="キーワードで検索する">
<input type="submit" name="submit" value="">
</form>
</div>
<ul class="side__list pc-only">
<?php
$args = array(
'posts_per_page' => -1,
'post_type' => 'faq',
'paged' => $paged,
'order' => 'ASC',
);
$the_query = new WP_Query($args);
if ($the_query->have_posts()) : while ($the_query->have_posts()) : $the_query->the_post();
?>
<li class="side__item">
<a class="side__txt" href="#faq-<?php echo get_the_ID() ?>"><?php the_title(); ?></a>
</li>
<?php endwhile;
endif; ?>
</ul>
</div>
</aside>
<main class="content">
<?php
$args = array(
'posts_per_page' => -1,
'post_type' => 'faq',
'paged' => $paged,
'order' => 'ASC',
);
$the_query = new WP_Query($args);
if ($the_query->have_posts()) : while ($the_query->have_posts()) : $the_query->the_post();
?>
<div class="p-faq-block">
<section id="faq-<?php echo get_the_ID() ?>" class="otherSingle1">
<h3 class="c-title1"><?php the_title(); ?></h3>
</section>
<section class="p-faq-Single1">
<?php if (have_rows('faq')): while (have_rows('faq')): the_row(); ?>
<?php if (have_rows('faq_group')): while (have_rows('faq_group')): the_row();
?>
<div class="p-faq-Box">
<div class="p-faq-Q">
<h4><?php echo get_sub_field('faq_question') ?></h4>
</div>
<div class="p-faq-A">
<h5><?php echo get_sub_field('faq_anser') ?></h5>
<div class="p-faq-A-inBox">
<?php echo get_sub_field('faq_anser_detail'); ?>
</div>
</div>
</div>
<?php endwhile; endif;
endwhile; endif; ?>
</section>
</div>
<?php endwhile; else : ?>
<p class="faq-notfound">該当する質問がありませんでした。<br class="sp-only">他のキーワードをお試しください。</p>
<?php endif; ?>
</main>
</div>
</div>
<script src="/assets/js/faq.min.js"></script>
<?php include(get_template_directory() . '/assets/include/footer.php'); ?>
<?php $pageid = "news"; ?>
<?php include(get_template_directory() . '/assets/include/header.php'); ?>
<div class="p-news">
<section class="c-mainvisual">
<div class="c-breadcrumb pc-only">
<ul class="c-breadcrumb__inner">
<?php if (function_exists('bcn_display')) {
bcn_display();
} ?>
</ul>
</div>
<div class="c-mainvisual__inner">
<h2 class="c-mainvisual__title">ニュース</h2>
</div>
</section>
<div class="container">
<aside class="side pc-only">
<div class="side__box">
<h3 class="side__mainttl">ニュース</h3>
<ul class="side__list">
<?php
$terms = get_terms("news_tax", $args = array(
'hide_empty' => false,
'orderby' => 'count',
'order' => 'DESC',
));
foreach ($terms as $term) {
$term_link = get_term_link($term);
if ($term->count > 0) { ?>
<li class="side__item">
<?php $clActive = ((get_queried_object()->slug) == ($term->slug)) ? "is-active" : ""; ?>
<a class="side__txt <?php echo $clActive; ?>" href="<?php echo esc_url($term_link); ?>"><?php echo $term->name; ?></a>
</li>
<?php } elseif ($term->count !== 0) { ?>
<li class="side__item"><?php echo $term->name; ?></li>
<?php }
} ?>
</ul>
</div>
</aside>
<main class="content">
<ul class="list">
<?php
// $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
// $args = array(
// 'post_type' => 'news',
// 'post_status' => 'publish',
// 'posts_per_page' => 1,
// 'tax_query' => array(array(
// 'taxonomy' => 'news_tax',
// 'field' => 'slug',
// 'terms' => get_queried_object()->slug,
// )),
// 'order' => 'ASC',
// 'paged' => $paged,
// );
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
parse_str($query_string, $args);
$args += array(
'posts_per_page' => 10,
'paged' => $paged
);
$the_query = new WP_Query($args);
?>
<?php if ($the_query->have_posts()) :
while ($the_query->have_posts()) : $the_query->the_post(); ?>
<li class="list_item">
<a class="list_link" href="<?php the_permalink(); ?>">
<div class="list_info">
<div class="list_heading">
<p class="list_date"><?php echo get_the_date("Y.m.d"); ?> </p>
<?php
$terms = wp_get_post_terms($post->ID, 'news_tax', array('order' => 'DESC', 'orderby' => 'count'));
if ($terms && !is_wp_error($terms)) :
foreach ($terms as $term) { ?>
<p class="list_cat <?php echo $term->slug; ?>"><?php echo $term->name; ?></p>
<?php }
endif; ?>
</div>
<h3 class="list_title"><?php the_title(); ?></h3>
<div class="list_text">
<?php $content = get_the_content();
$input = strip_tags($content);
$output = strip_tags($content, "<a>");
echo $input; ?>
</div>
</div>
<div class="list_image">
<?php if (has_post_thumbnail()) {
the_post_thumbnail();
} else { ?>
<img src="/assets/img/news/img-news.jpg" alt="">
<?php } ?>
</div>
</a>
</li>
<?php
endwhile;
else : ?>
<p class="p-news__noevent">まだイベントはありません</p>
<?php endif;
wp_reset_postdata();
?>
</ul>
<?php wp_pagenavi(array(
'wrapper_class' => 'paging',
'query' => $the_query,
)); ?>
</main>
</div>
</div>
<script src="/common_previous/js/news.min.js"></script>
<?php $pageid = "news"; ?>
<?php include(get_template_directory() . '/assets/include/header.php'); ?>
<div class="p-news">
<section class="c-mainvisual">
<div class="c-breadcrumb pc-only">
<ul class="c-breadcrumb__inner">
<?php if (function_exists('bcn_display')) {
bcn_display();
} ?>
</ul>
</div>
<div class="c-mainvisual__inner">
<h2 class="c-mainvisual__title">ニュース</h2>
</div>
</section>
<div class="container">
<aside class="side pc-only">
<div class="side__box">
<h3 class="side__mainttl">ニュース</h3>
<ul class="side__list">
<?php
$terms = get_terms("news_tax", $args = array(
'hide_empty' => false,
'orderby' => 'count',
'order' => 'DESC',
));
foreach ($terms as $term) {
$term_link = get_term_link($term);
if ($term->count > 0) { ?>
<li class="side__item">
<?php $clActive = ((get_queried_object()->slug) == ($term->slug)) ? "is-active" : ""; ?>
<a class="side__txt <?php echo $clActive; ?>" href="<?php echo esc_url($term_link); ?>"><?php echo $term->name; ?></a>
</li>
<?php } elseif ($term->count !== 0) { ?>
<li class="side__item"><?php echo $term->name; ?></li>
<?php }
} ?>
</ul>
</div>
</aside>
<main class="content">
<ul class="list">
<?php
// $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
// $args = array(
// 'post_type' => 'news',
// 'post_status' => 'publish',
// 'posts_per_page' => 1,
// 'tax_query' => array(array(
// 'taxonomy' => 'news_tax',
// 'field' => 'slug',
// 'terms' => get_queried_object()->slug,
// )),
// 'order' => 'ASC',
// 'paged' => $paged,
// );
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
parse_str($query_string, $args);
$args += array(
'posts_per_page' => 10,
'paged' => $paged
);
$the_query = new WP_Query($args);
?>
<?php if ($the_query->have_posts()) :
while ($the_query->have_posts()) : $the_query->the_post(); ?>
<li class="list_item">
<a class="list_link" href="<?php the_permalink(); ?>">
<div class="list_info">
<div class="list_heading">
<p class="list_date"><?php echo get_the_date("Y.m.d"); ?> </p>
<?php
$terms = wp_get_post_terms($post->ID, 'news_tax', array('order' => 'DESC', 'orderby' => 'count'));
if ($terms && !is_wp_error($terms)) :
foreach ($terms as $term) { ?>
<p class="list_cat <?php echo $term->slug; ?>"><?php echo $term->name; ?></p>
<?php }
endif; ?>
</div>
<h3 class="list_title"><?php the_title(); ?></h3>
<div class="list_text">
<?php $content = get_the_content();
$input = strip_tags($content);
$output = strip_tags($content, "<a>");
echo $input; ?>
</div>
</div>
<div class="list_image">
<?php if (has_post_thumbnail()) {
the_post_thumbnail();
} else { ?>
<img src="/assets/img/news/img-news.jpg" alt="">
<?php } ?>
</div>
</a>
</li>
<?php
endwhile;
else : ?>
<p class="p-news__noevent">まだイベントはありません</p>
<?php endif;
wp_reset_postdata();
?>
</ul>
<?php wp_pagenavi(array(
'wrapper_class' => 'paging',
'query' => $the_query,
)); ?>
</main>
</div>
</div>
<script src="/common_previous/js/news.min.js"></script>
<?php include(get_template_directory() . '/assets/include/footer.php'); ?>
\ No newline at end of file
<?php include(get_template_directory() . '/assets/include/header.php'); ?>
<?php include(get_template_directory() . '/assets/include/header.php'); ?>
<?php include(get_template_directory() . '/assets/include/footer.php'); ?>
\ No newline at end of file
.content_wrap {
min-height: 0;
}
.content_wrap:after {
content: "";
visibility: hidden;
display: block;
clear: both;
font-size: 0;
height: 0;
}
.content_wrap img {
width: auto;
}
body.wp-editor strong, .content_wrap strong {
font-weight: bold;
}
body.wp-editor h1, .content_wrap h1 {
display: block;
font-weight: bold;
font-size: 2em;
}
body.wp-editor h2, .content_wrap h2 {
display: block;
font-weight: bold;
font-size: 1.5em;
}
body.wp-editor h3, .content_wrap h3 {
display: block;
font-weight: bold;
font-size: 1.17em;
}
body.wp-editor h4, .content_wrap h4 {
display: block;
font-weight: bold;
margin: 1.33em 0;
}
body.wp-editor h5, .content_wrap h5 {
display: block;
font-weight: bold;
font-size: 0.83em;
}
body.wp-editor h6, .content_wrap h6 {
display: block;
font-weight: bold;
font-size: 0.67em;
}
body.wp-editor a, .content_wrap a {
color: inherit;
}
body.wp-editor ol, .content_wrap ol {
list-style: decimal;
padding-inline-start: 20px;
}
body.wp-editor ul, .content_wrap ul {
list-style: disc;
padding-inline-start: 20px;
}
body.wp-editor li, .content_wrap li {
list-style: inherit;
}
body.wp-editor table, .content_wrap table,
body.wp-editor th, .content_wrap th,
body.wp-editor td, .content_wrap td {
padding: 5px;
}
body.wp-editor .aligncenter, .content_wrap .aligncenter {
display: block;
margin: 10px auto;
}
body.wp-editor .alignleft, .content_wrap .alignleft {
float: left;
margin: 5px 20px 5px 0;
}
body.wp-editor .alignright, .content_wrap .alignright {
float: right;
margin: 5px 0 5px 20px;
}
.detailsCont dl dt{
font-weight: 600;
font-size: 1.2em;
margin-bottom: 0.2em;
}
.detailsCont dl dd.mb20{
margin-bottom: 20px;
}
.detailsCont dl dd.clear::after{
content: "";
clear: both;
display: block;
}
.detailsCont p.img_30{
margin-bottom: 30px;
}
.detailsCont dl dd.fr{
float: right;
margin-left: 20px;
}
.detailsCont dl dd.fr_tex{
margin: 20px 0;
}
.detailsCont dl dd.fl{
float: left;
margin-right: 20px;
}
.detailsCont dl dd.fl_tex{
margin: 20px 20px 20px 0;
}
/*-----------------------------------
記事内の画像回り込み指定 2020/11/30
-----------------------------------*/
.detailsCont p img.alignright {
float:left;
margin:0 10px 10px 0;
padding-top:0;
}
.detailsCont p img.alignleft {
float:right;
margin:0 10px 10px;
padding-top:0;
}
.detailsCont p img.aligncenter {
margin:10px auto;
}
@media screen and (max-width: 767px) {
body.wp-editor .alignleft, .content_wrap .alignleft,
body.wp-editor .alignright, .content_wrap .alignright {
display: block;
float: none;
margin: 10px auto;
}
}
<?php /*========================================
btn
================================================*/ ?>
<div class="c-dev-title1">btn</div>
<?php /*----------------------------------------*/ ?>
<div class="c-dev-title2"></div>
<?php /*========================================
btn
================================================*/ ?>
<div class="c-dev-title1">btn</div>
<?php /*----------------------------------------*/ ?>
<div class="c-dev-title2"></div>
......
<?php /*========================================
title
================================================*/ ?>
<div class="c-dev-title1">title</div>
<?php /*----------------------------------------*/ ?>
<div class="c-dev-title2"></div>
<?php /*========================================
title
================================================*/ ?>
<div class="c-dev-title1">title</div>
<?php /*----------------------------------------*/ ?>
<div class="c-dev-title2"></div>
......
<?php /*========================================
icon
================================================*/ ?>
<div class="c-dev-title1">icon</div>
<?php /*----------------------------------------*/ ?>
<div class="c-dev-title2"></div>
<?php /*========================================
icon
================================================*/ ?>
<div class="c-dev-title1">icon</div>
<?php /*----------------------------------------*/ ?>
<div class="c-dev-title2"></div>
......
<?php /*========================================
form
================================================*/ ?>
<div class="c-dev-title1">form</div>
<?php /*----------------------------------------*/ ?>
<div class="c-dev-title2"></div>
<?php /*========================================
form
================================================*/ ?>
<div class="c-dev-title1">form</div>
<?php /*----------------------------------------*/ ?>
<div class="c-dev-title2"></div>
......
<?php /*========================================
text
================================================*/ ?>
<div class="c-dev-title1">text</div>
<?php /*----------------------------------------*/ ?>
<div class="c-dev-title2"></div>
<?php /*========================================
text
================================================*/ ?>
<div class="c-dev-title1">text</div>
<?php /*----------------------------------------*/ ?>
<div class="c-dev-title2"></div>
......
<?php /*========================================
navi
================================================*/ ?>
<div class="c-dev-title1">navi</div>
<?php /*----------------------------------------*/ ?>
<div class="c-dev-title2"></div>
<?php /*========================================
navi
================================================*/ ?>
<div class="c-dev-title1">navi</div>
<?php /*----------------------------------------*/ ?>
<div class="c-dev-title2"></div>
......
<?php /*========================================
img
================================================*/ ?>
<div class="c-dev-title1">img</div>
<?php /*----------------------------------------*/ ?>
<div class="c-dev-title2"></div>
<?php /*========================================
img
================================================*/ ?>
<div class="c-dev-title1">img</div>
<?php /*----------------------------------------*/ ?>
<div class="c-dev-title2"></div>
......
<?php /*========================================
list
================================================*/ ?>
<div class="c-dev-title1">list</div>
<?php /*----------------------------------------*/ ?>
<div class="c-dev-title2"></div>
<?php /*========================================
list
================================================*/ ?>
<div class="c-dev-title1">list</div>
<?php /*----------------------------------------*/ ?>
<div class="c-dev-title2"></div>
......
<?php /*========================================
table
================================================*/ ?>
<div class="c-dev-title1">table</div>
<?php /*----------------------------------------*/ ?>
<div class="c-dev-title2"></div>
<?php /*========================================
table
================================================*/ ?>
<div class="c-dev-title1">table</div>
<?php /*----------------------------------------*/ ?>
<div class="c-dev-title2"></div>
......
<?php /*========================================
line
================================================*/ ?>
<div class="c-dev-title1">line</div>
<?php /*----------------------------------------*/ ?>
<div class="c-dev-title2"></div>
<?php /*========================================
line
================================================*/ ?>
<div class="c-dev-title1">line</div>
<?php /*----------------------------------------*/ ?>
<div class="c-dev-title2"></div>
......
<?php /*========================================
video
================================================*/ ?>
<div class="c-dev-title1">video</div>
<?php /*----------------------------------------*/ ?>
<div class="c-dev-title2"></div>
<?php /*========================================
video
================================================*/ ?>
<div class="c-dev-title1">video</div>
<?php /*----------------------------------------*/ ?>
<div class="c-dev-title2"></div>
......
<?php /*========================================
slide
================================================*/ ?>
<div class="c-dev-title1">slide</div>
<?php /*----------------------------------------*/ ?>
<div class="c-dev-title2"></div>
<?php /*========================================
slide
================================================*/ ?>
<div class="c-dev-title1">slide</div>
<?php /*----------------------------------------*/ ?>
<div class="c-dev-title2"></div>
......
<?php /*========================================
other
================================================*/ ?>
<div class="c-dev-title1">other</div>
<?php /*----------------------------------------*/ ?>
<div class="c-dev-title2"></div>
<?php /*========================================
other
================================================*/ ?>
<div class="c-dev-title1">other</div>
<?php /*----------------------------------------*/ ?>
<div class="c-dev-title2"></div>
......
// menu pc
$(function () {
$(".p-faq-Q").on("click", function () {
$(this).next().slideToggle();
$(this).toggleClass("active"); //追加部分
});
var $container = $(".content");
var $input = $(".search__input").find('input[type=text]');
var $items = $container.find("h4");
var $item = $();
var itemsIndexed = [];
$items.each(function () {
//正規表現でキーワードを抽出
itemsIndexed.push($(this).text().replace(/\s{2,}/g, ' ').toLowerCase());
});
$input.on('keyup', function (e) {
$items.each(function () {
$item = $(this);
//spanで括ってハイライト
$item.html($item.html().replace(/<span class="highlight">([^<]+)<\/span>/gi, '$1'));
});
var searchVal = $.trim($input.val()).toLowerCase();
if (searchVal.length) {
for (var i in itemsIndexed) {
$item = $items.eq(i);
if (itemsIndexed[i].indexOf(searchVal) != -1) {
$item.html($item.html().replace(new RegExp(searchVal + '(?!([^<]+)?>)', 'gi'), '<span class="highlight">$&</span>'));
$item.parent().parent().css("display", "block");
} else {
$item.parent().parent().css("display", "none");
var len1 = $('#sect1 .p-faq-Box').filter(':visible').length;
var len2 = $('#sect2 .p-faq-Box').filter(':visible').length;
var len3 = $('#sect3 .p-faq-Box').filter(':visible').length;
var len4 = $('#sect4 .p-faq-Box').filter(':visible').length;
var len5 = $('#sect5 .p-faq-Box').filter(':visible').length;
var len6 = $('#sect6 .p-faq-Box').filter(':visible').length;
if (len1 == 0) {
$("#faq-01").css("display", "none");
} else {
$("#faq-01").css("display", "block");
}
if (len2 == 0) {
$("#faq-02").css("display", "none");
} else {
$("#faq-02").css("display", "block");
}
if (len3 == 0) {
$("#faq-03").css("display", "none");
} else {
$("#faq-03").css("display", "block");
}
if (len4 == 0) {
$("#faq-04").css("display", "none");
} else {
$("#faq-04").css("display", "block");
}
if (len5 == 0) {
$("#faq-05").css("display", "none");
} else {
$("#faq-05").css("display", "block");
}
if (len6 == 0) {
$("#faq-06").css("display", "none");
} else {
$("#faq-06").css("display", "block");
}
if (len1 == 0 && len2 == 0 && len3 == 0 && len4 == 0 && len5 == 0 && len6 == 0) {
$(".faq-notfound").css("display", "block");
} else {
$(".faq-notfound").css("display", "none");
}
}
}
} else {
$items.parent().parent().css("display", "block");
$("#faq-01").css("display", "block");
$("#faq-02").css("display", "block");
$("#faq-03").css("display", "block");
$("#faq-04").css("display", "block");
$("#faq-05").css("display", "block");
$("#faq-06").css("display", "block");
}
});
});
// menu pc
$(function () {
$(".p-faq-Q").on("click", function () {
$(this).next().slideToggle();
$(this).toggleClass("active"); //追加部分
});
var $container = $(".content");
var $input = $(".search__input").find('input[type=text]');
var $items = $container.find("h4");
var $item = $();
var itemsIndexed = [];
$items.each(function () {
//正規表現でキーワードを抽出
itemsIndexed.push($(this).text().replace(/\s{2,}/g, ' ').toLowerCase());
});
$input.on('keyup', function (e) {
$items.each(function () {
$item = $(this);
//spanで括ってハイライト
$item.html($item.html().replace(/<span class="highlight">([^<]+)<\/span>/gi, '$1'));
});
var searchVal = $.trim($input.val()).toLowerCase();
if (searchVal.length) {
for (var i in itemsIndexed) {
$item = $items.eq(i);
if (itemsIndexed[i].indexOf(searchVal) != -1) {
$item.html($item.html().replace(new RegExp(searchVal + '(?!([^<]+)?>)', 'gi'), '<span class="highlight">$&</span>'));
$item.parent().parent().css("display", "block");
} else {
$item.parent().parent().css("display", "none");
var len1 = $('#sect1 .p-faq-Box').filter(':visible').length;
var len2 = $('#sect2 .p-faq-Box').filter(':visible').length;
var len3 = $('#sect3 .p-faq-Box').filter(':visible').length;
var len4 = $('#sect4 .p-faq-Box').filter(':visible').length;
var len5 = $('#sect5 .p-faq-Box').filter(':visible').length;
var len6 = $('#sect6 .p-faq-Box').filter(':visible').length;
if (len1 == 0) {
$("#faq-01").css("display", "none");
} else {
$("#faq-01").css("display", "block");
}
if (len2 == 0) {
$("#faq-02").css("display", "none");
} else {
$("#faq-02").css("display", "block");
}
if (len3 == 0) {
$("#faq-03").css("display", "none");
} else {
$("#faq-03").css("display", "block");
}
if (len4 == 0) {
$("#faq-04").css("display", "none");
} else {
$("#faq-04").css("display", "block");
}
if (len5 == 0) {
$("#faq-05").css("display", "none");
} else {
$("#faq-05").css("display", "block");
}
if (len6 == 0) {
$("#faq-06").css("display", "none");
} else {
$("#faq-06").css("display", "block");
}
if (len1 == 0 && len2 == 0 && len3 == 0 && len4 == 0 && len5 == 0 && len6 == 0) {
$(".faq-notfound").css("display", "block");
} else {
$(".faq-notfound").css("display", "none");
}
}
}
} else {
$items.parent().parent().css("display", "block");
$("#faq-01").css("display", "block");
$("#faq-02").css("display", "block");
$("#faq-03").css("display", "block");
$("#faq-04").css("display", "block");
$("#faq-05").css("display", "block");
$("#faq-06").css("display", "block");
}
});
});
/*!
* jQuery FixedTableHeader plugin
*
* Copyright 2014 Hung Nguyen
*
* Date: Tue Nov 4 2014 07:00:00 GMT
*/
/*jslint browser: true, nomen: true, unparam: true, node: true*/
/*global $, jQuery*/
'use strict';
(function ($) {
$.fn.fixedTableHeader = function () {
return this.each(function (key, item) {
var $self = $(this),
$fixedHeader,
$originalHeader,
tableTopOffset,
tableBottomOffset,
headerHeight,
originalWidth = [];
$self.find('thead > tr > th').each(function (key, item) {
originalWidth.push($(item).outerWidth());
});
function init() {
var ua = navigator.userAgent;
if (ua.indexOf('iPhone') > 0 || ua.indexOf('Android') > 0 && ua.indexOf('Mobile') > 0) {
$originalHeader = $self.find('thead:first');
$fixedHeader = $originalHeader.clone();
$fixedHeader.css('position', 'fixed');
$fixedHeader.css('display', 'none');
$fixedHeader.css('height', $self.find('thead').outerHeight());
$fixedHeader.css('width', $self.find('thead').outerWidth());
$fixedHeader.css('top', 100);
$fixedHeader.css('left', $self.find('thead').offset().left);
$fixedHeader.css('margin-top', 0);
$fixedHeader.css('z-index', 1);
$originalHeader.after($fixedHeader);
} else {
$originalHeader = $self.find('thead:first');
$fixedHeader = $originalHeader.clone();
$fixedHeader.css('position', 'fixed');
$fixedHeader.css('display', 'none');
$fixedHeader.css('height', $self.find('thead').outerHeight());
$fixedHeader.css('width', $self.find('thead').outerWidth());
$fixedHeader.css('top', 50);
$fixedHeader.css('left', $self.find('thead').offset().left);
$fixedHeader.css('margin-top', 0);
$fixedHeader.css('z-index', 1);
$originalHeader.after($fixedHeader);
}
}
function left() {
return parseInt($self.offset().left, 10) - parseInt($(window).scrollLeft(), 10);
}
function onResize() {
$fixedHeader.css('left', left());
$fixedHeader.css('width', $self.find('thead').outerWidth());
$fixedHeader.find("th").each(function (index) {
originalWidth[index] = $originalHeader.find("th").eq(index).outerWidth();
$(this).css("min-width", $originalHeader.find("th").eq(index).outerWidth());
$(this).css("max-width", $originalHeader.find("th").eq(index).outerWidth());
});
}
function onScroll() {
tableTopOffset = $self.offset().top;
headerHeight = $fixedHeader.find('tr').height();
tableBottomOffset = tableTopOffset + $self.height() - headerHeight;
$fixedHeader.find('th').each(function (key, item) {
$(item).css('min-width', parseInt(originalWidth[key], 10));
$(item).css('max-width', parseInt(originalWidth[key], 10));
});
$fixedHeader.css('left', left());
if ($(window).scrollTop() > tableTopOffset && $(window).scrollTop() < tableBottomOffset) {
$fixedHeader.show();
} else {
$fixedHeader.hide();
}
}
init();
$(window).resize(onResize);
$(window).scroll(onScroll);
});
};
}(jQuery));
/*!
* jQuery FixedTableHeader plugin
*
* Copyright 2014 Hung Nguyen
*
* Date: Tue Nov 4 2014 07:00:00 GMT
*/
/*jslint browser: true, nomen: true, unparam: true, node: true*/
/*global $, jQuery*/
'use strict';
(function ($) {
$.fn.fixedTableHeader = function () {
return this.each(function (key, item) {
var $self = $(this),
$fixedHeader,
$originalHeader,
tableTopOffset,
tableBottomOffset,
headerHeight,
originalWidth = [];
$self.find('thead > tr > th').each(function (key, item) {
originalWidth.push($(item).outerWidth());
});
function init() {
var ua = navigator.userAgent;
if (ua.indexOf('iPhone') > 0 || ua.indexOf('Android') > 0 && ua.indexOf('Mobile') > 0) {
$originalHeader = $self.find('thead:first');
$fixedHeader = $originalHeader.clone();
$fixedHeader.css('position', 'fixed');
$fixedHeader.css('display', 'none');
$fixedHeader.css('height', $self.find('thead').outerHeight());
$fixedHeader.css('width', $self.find('thead').outerWidth());
$fixedHeader.css('top', 100);
$fixedHeader.css('left', $self.find('thead').offset().left);
$fixedHeader.css('margin-top', 0);
$fixedHeader.css('z-index', 1);
$originalHeader.after($fixedHeader);
} else {
$originalHeader = $self.find('thead:first');
$fixedHeader = $originalHeader.clone();
$fixedHeader.css('position', 'fixed');
$fixedHeader.css('display', 'none');
$fixedHeader.css('height', $self.find('thead').outerHeight());
$fixedHeader.css('width', $self.find('thead').outerWidth());
$fixedHeader.css('top', 50);
$fixedHeader.css('left', $self.find('thead').offset().left);
$fixedHeader.css('margin-top', 0);
$fixedHeader.css('z-index', 1);
$originalHeader.after($fixedHeader);
}
}
function left() {
return parseInt($self.offset().left, 10) - parseInt($(window).scrollLeft(), 10);
}
function onResize() {
$fixedHeader.css('left', left());
$fixedHeader.css('width', $self.find('thead').outerWidth());
$fixedHeader.find("th").each(function (index) {
originalWidth[index] = $originalHeader.find("th").eq(index).outerWidth();
$(this).css("min-width", $originalHeader.find("th").eq(index).outerWidth());
$(this).css("max-width", $originalHeader.find("th").eq(index).outerWidth());
});
}
function onScroll() {
tableTopOffset = $self.offset().top;
headerHeight = $fixedHeader.find('tr').height();
tableBottomOffset = tableTopOffset + $self.height() - headerHeight;
$fixedHeader.find('th').each(function (key, item) {
$(item).css('min-width', parseInt(originalWidth[key], 10));
$(item).css('max-width', parseInt(originalWidth[key], 10));
});
$fixedHeader.css('left', left());
if ($(window).scrollTop() > tableTopOffset && $(window).scrollTop() < tableBottomOffset) {
$fixedHeader.show();
} else {
$fixedHeader.hide();
}
}
init();
$(window).resize(onResize);
$(window).scroll(onScroll);
});
};
}(jQuery));
<?php if(!is_home()){?>
<ul class="c-breadcrumb">
<li><a href="<?php echo home_url(); ?>">home</a></li>
<?php /*=======================================
custom post
===============================================*/ ?>
<?php if(is_singular("xxxx")){ ?>
<?php /*=======================================
single
===============================================*/ ?>
<?php }elseif((is_single()&&get_post_type()=="post")){ ?>
<?php /*=======================================
single
===============================================*/ ?>
<?php }elseif(is_single()){ ?>
<?php /*=======================================
pages
===============================================*/ ?>
<?php }elseif(is_page()){ ?>
<?php /*=======================================
other
===============================================*/ ?>
<?php }else{ ?>
<?php } ?>
<li><?php the_title(); ?></li>
</ul>
<?php } ?>
<?php if(!is_home()){?>
<ul class="c-breadcrumb">
<li><a href="<?php echo home_url(); ?>">home</a></li>
<?php /*=======================================
custom post
===============================================*/ ?>
<?php if(is_singular("xxxx")){ ?>
<?php /*=======================================
single
===============================================*/ ?>
<?php }elseif((is_single()&&get_post_type()=="post")){ ?>
<?php /*=======================================
single
===============================================*/ ?>
<?php }elseif(is_single()){ ?>
<?php /*=======================================
pages
===============================================*/ ?>
<?php }elseif(is_page()){ ?>
<?php /*=======================================
other
===============================================*/ ?>
<?php }else{ ?>
<?php } ?>
<li><?php the_title(); ?></li>
</ul>
<?php } ?>
<?php /*========================================
btn
================================================*/ ?>
<div class="c-dev-title1">btn</div>
<?php /*----------------------------------------*/ ?>
<div class="c-dev-title2"></div>
<?php /*========================================
btn
================================================*/ ?>
<div class="c-dev-title1">btn</div>
<?php /*----------------------------------------*/ ?>
<div class="c-dev-title2"></div>
<?php /*========================================
title
================================================*/ ?>
<div class="c-dev-title1">title</div>
<?php /*----------------------------------------*/ ?>
<div class="c-dev-title2"></div>
<?php /*========================================
title
================================================*/ ?>
<div class="c-dev-title1">title</div>
<?php /*----------------------------------------*/ ?>
<div class="c-dev-title2"></div>
<?php /*========================================
icon
================================================*/ ?>
<div class="c-dev-title1">icon</div>
<?php /*----------------------------------------*/ ?>
<div class="c-dev-title2"></div>
<?php /*========================================
icon
================================================*/ ?>
<div class="c-dev-title1">icon</div>
<?php /*----------------------------------------*/ ?>
<div class="c-dev-title2"></div>
<?php /*========================================
form
================================================*/ ?>
<div class="c-dev-title1">form</div>
<?php /*----------------------------------------*/ ?>
<div class="c-dev-title2"></div>
<?php /*========================================
form
================================================*/ ?>
<div class="c-dev-title1">form</div>
<?php /*----------------------------------------*/ ?>
<div class="c-dev-title2"></div>
<?php /*========================================
text
================================================*/ ?>
<div class="c-dev-title1">text</div>
<?php /*----------------------------------------*/ ?>
<div class="c-dev-title2"></div>
<?php /*========================================
text
================================================*/ ?>
<div class="c-dev-title1">text</div>
<?php /*----------------------------------------*/ ?>
<div class="c-dev-title2"></div>
<?php /*========================================
navi
================================================*/ ?>
<div class="c-dev-title1">navi</div>
<?php /*----------------------------------------*/ ?>
<div class="c-dev-title2"></div>
<?php /*========================================
navi
================================================*/ ?>
<div class="c-dev-title1">navi</div>
<?php /*----------------------------------------*/ ?>
<div class="c-dev-title2"></div>
<?php /*========================================
img
================================================*/ ?>
<div class="c-dev-title1">img</div>
<?php /*----------------------------------------*/ ?>
<div class="c-dev-title2"></div>
<?php /*========================================
img
================================================*/ ?>
<div class="c-dev-title1">img</div>
<?php /*----------------------------------------*/ ?>
<div class="c-dev-title2"></div>
<?php /*========================================
list
================================================*/ ?>
<div class="c-dev-title1">list</div>
<?php /*----------------------------------------*/ ?>
<div class="c-dev-title2"></div>
<?php /*========================================
list
================================================*/ ?>
<div class="c-dev-title1">list</div>
<?php /*----------------------------------------*/ ?>
<div class="c-dev-title2"></div>
<?php /*========================================
table
================================================*/ ?>
<div class="c-dev-title1">table</div>
<?php /*----------------------------------------*/ ?>
<div class="c-dev-title2"></div>
<?php /*========================================
table
================================================*/ ?>
<div class="c-dev-title1">table</div>
<?php /*----------------------------------------*/ ?>
<div class="c-dev-title2"></div>
<?php /*========================================
line
================================================*/ ?>
<div class="c-dev-title1">line</div>
<?php /*----------------------------------------*/ ?>
<div class="c-dev-title2"></div>
<?php /*========================================
line
================================================*/ ?>
<div class="c-dev-title1">line</div>
<?php /*----------------------------------------*/ ?>
<div class="c-dev-title2"></div>
<?php /*========================================
video
================================================*/ ?>
<div class="c-dev-title1">video</div>
<?php /*----------------------------------------*/ ?>
<div class="c-dev-title2"></div>
<?php /*========================================
video
================================================*/ ?>
<div class="c-dev-title1">video</div>
<?php /*----------------------------------------*/ ?>
<div class="c-dev-title2"></div>
<?php /*========================================
slide
================================================*/ ?>
<div class="c-dev-title1">slide</div>
<?php /*----------------------------------------*/ ?>
<div class="c-dev-title2"></div>
<?php /*========================================
slide
================================================*/ ?>
<div class="c-dev-title1">slide</div>
<?php /*----------------------------------------*/ ?>
<div class="c-dev-title2"></div>
<?php /*========================================
other
================================================*/ ?>
<div class="c-dev-title1">other</div>
<?php /*----------------------------------------*/ ?>
<div class="c-dev-title2"></div>
<?php /*========================================
other
================================================*/ ?>
<div class="c-dev-title1">other</div>
<?php /*----------------------------------------*/ ?>
<div class="c-dev-title2"></div>
<?php if(is_home()){ ?>
<title><?php bloginfo('name'); ?></title>
<?php }else{ ?>
<title><?php echo trim(wp_title('', false)); ?><?php if(!is_home()){ ?> | <?php } ?><?php bloginfo('name'); ?></title>
<?php } ?>
<meta name="description" content="">
<meta name="keywords" content="">
<?php
/*
<?php
$title = "";
$description = "";
$keyword = "";
?>
<title><?php echo $title; ?></title>
<meta name="description" content="<?php echo $description; ?>">
<meta name="keywords" content="<?php echo $keyword; ?>">
<?php if(is_home()){ ?>
<title><?php bloginfo('name'); ?></title>
<?php }else{ ?>
<title><?php echo trim(wp_title('', false)); ?><?php if(!is_home()){ ?> | <?php } ?><?php bloginfo('name'); ?></title>
<?php } ?>
<meta name="description" content="">
<meta name="keywords" content="">
<?php
/*
<?php
$title = "";
$description = "";
$keyword = "";
?>
<title><?php echo $title; ?></title>
<meta name="description" content="<?php echo $description; ?>">
<meta name="keywords" content="<?php echo $keyword; ?>">
*/ ?>
\ No newline at end of file
<?php include(get_template_directory() . '/assets/include/header.php'); ?>
<?php
//管理画面で編集するページ
if(
is_page("xxx")
) {
while (have_posts()){ the_post();the_content();}
//テンプレート埋め込み
}else{
include(get_template_directory().'/libs/page/'.get_page($page_id)->post_name.'.php');
}?>
<?php include(get_template_directory() . '/assets/include/header.php'); ?>
<?php
//管理画面で編集するページ
if(
is_page("xxx")
) {
while (have_posts()){ the_post();the_content();}
//テンプレート埋め込み
}else{
include(get_template_directory().'/libs/page/'.get_page($page_id)->post_name.'.php');
}?>
<?php include(get_template_directory() . '/assets/include/footer.php'); ?>
\ No newline at end of file
<?php include(get_template_directory() . '/assets/include/header.php'); ?>
<?php the_title(); ?>
<?php the_time('Y.n.j'); ?>
<?php while (have_posts()){ the_post();the_content();} ?>
<?php include(get_template_directory() . '/assets/include/footer.php'); ?>
<?php include(get_template_directory() . '/assets/include/header.php'); ?>
<?php the_title(); ?>
<?php the_time('Y.n.j'); ?>
<?php while (have_posts()){ the_post();the_content();} ?>
<?php include(get_template_directory() . '/assets/include/footer.php'); ?>
@charset "UTF-8";/*! Theme Name: wp */abbr,address,article,aside,audio,b,blockquote,body,caption,cite,code,dd,del,dfn,dialog,div,dl,dt,em,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,html,i,iframe,img,ins,kbd,label,legend,li,mark,nav,object,ol,p,pre,q,samp,section,small,span,strong,sub,sup,table,tbody,td,tfoot,th,thead,time,tr,ul,var,video{font-size:1em;margin:0;padding:0;border:0;outline:0;-webkit-box-sizing:border-box;box-sizing:border-box}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section{display:block}html{font-size:62.5%}body{-webkit-text-size-adjust:100%}body,h1,h2,h3,h4,h5,h6,input,option,select,table,textarea{font-family:"ヒラギノ角ゴ Pro","Hiragino Kaku Gothic Pro","メイリオ",Meiryo,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}h1,h2,h3,h4,h5,h6{font-weight:700}input,option,select,table,textarea{line-height:1.1}ol,ul{list-style:none}blockquote,q{quotes:none}:focus{outline:0}ins{text-decoration:none}del{text-decoration:line-through}img{vertical-align:top}a{-webkit-transition:.3s ease-in-out;transition:.3s ease-in-out}a:hover{opacity:.8;-ms-filter:"alpha(opacity=80)"}#__bs_notify__{opacity:.3!important;font-size:5px!important;line-height:100%!important;padding:0 5px 0 5px!important;border-radius:0!important}.c-dev-title1{background:#000;color:#fff;line-height:1;padding:6px 0 6px 15px;font-size:1.6rem;margin:60px 0 20px 0}.c-dev-title2{background:#888;color:#fff;line-height:1;padding:6px 0 6px 30px;font-size:1.3rem;margin:50px 0 10px 0}.c-dev-message1{top:0;left:0;background:red;color:#fff;z-index:9999;position:fixed;line-height:1;padding:3px 6px;opacity:.6;font-size:8px}@media (min-width:768px){.sp-only{display:none}}@media screen and (max-width:767px){.pc-only{display:none}img{max-width:100%;height:auto}}
/*# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlLnNjc3MiLCIwX2Jhc2UvX3Jlc2V0LnNjc3MiLCIwX2Jhc2UvX2RldmVsb3Auc2NzcyIsIjBfYmFzZS9fbWl4aW4uc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiaUJBRUEscUJDaUJBLEtBQ0EsUUFvQ0EsUUFDQSxNQVNBLE1BOUJBLEVBbkJBLFdBWkEsS0E0Q0EsUUE1QkEsS0FDQSxLQWtCQSxHQWpCQSxJQUNBLElBa0NBLE9BcERBLElBZ0NBLEdBQ0EsR0FkQSxHQW1CQSxTQWVBLE9BQ0EsT0FmQSxLQW5DQSxHQUNBLEdBQ0EsR0FDQSxHQUNBLEdBQ0EsR0E4Q0EsT0F6REEsS0FpQ0EsRUE1QkEsT0FpQkEsSUFDQSxJQUNBLElBa0JBLE1BQ0EsT0FKQSxHQXNCQSxLQUhBLElBdERBLE9BaUNBLEdBekJBLEVBRUEsSUFXQSxFQUNBLEtBaUNBLFFBaENBLE1BeEJBLEtBeUJBLE9BQ0EsSUFDQSxJQWNBLE1BRUEsTUFLQSxHQUpBLE1BR0EsR0FGQSxNQVlBLEtBWEEsR0FYQSxHQVBBLElBZ0NBLE1BQ0MsVUFBVyxJQUNYLE9BQVEsRUFDUixRQUFTLEVBQ1QsT0FBUSxFQUNSLFFBQVMsRUFDVCxXQUFZLFdBR2IsUUFDQSxNQUNBLFFBQ0EsV0FDQSxPQUNBLE9BQ0EsT0FDQSxPQUlBLEtBSEEsS0FDQSxJQUNBLFFBRUMsUUFBUyxNQUdWLEtBQ0MsVUFBVyxNQUdaLEtBQ0MseUJBQTBCLEtBRzNCLEtBTUEsR0FDQSxHQUNBLEdBQ0EsR0FDQSxHQUNBLEdBVEEsTUFHQSxPQURBLE9BSEEsTUFFQSxTQVNDLFlBQWEsWUFBQSxDQUFBLDBCQUFBLENBQUEsTUFBQSxDQUFBLE1BQUEsQ0FBQSxXQUNiLHVCQUF3QixZQUN4Qix3QkFBeUIsVUFHMUIsR0FDQSxHQUNBLEdBQ0EsR0FDQSxHQUNBLEdBQ0MsWUFBYSxJQUlkLE1BR0EsT0FEQSxPQUhBLE1BRUEsU0FHQyxZQUFhLElBR2QsR0FDQSxHQUNDLFdBQVksS0FHYixXQUNBLEVBQ0MsT0FBUSxLQUdULE9BQ0MsUUFBUyxFQUdWLElBQ0MsZ0JBQWlCLEtBR2xCLElBQ0MsZ0JBQWlCLGFBR2xCLElBQ0MsZUFBZ0IsSUFHakIsRUFDQyxXQUFZLElBQUEsWUFFYixRQUNDLFFBQVMsR0FFVCxXQUFZLG9CQ2xLYixlQUNDLFFBQVMsYUFDVCxVQUFXLGNBQ1gsWUFBYSxlQUNiLFFBQVMsRUFBQSxJQUFBLEVBQUEsY0FDVCxzQkFBdUIsWUFDdkIsY0FBZSxZQUdoQixjQUNDLFdBQVksS0FDWixNQUFPLEtBQ1AsWUFBYSxFQUNiLFFBQVMsSUFBQSxFQUFBLElBQUEsS0FDVCxVQUFXLE9BQ1gsT0FBUSxLQUFBLEVBQUEsS0FBQSxFQUdULGNBQ0MsV0FBWSxLQUNaLE1BQU8sS0FDUCxZQUFhLEVBQ2IsUUFBUyxJQUFBLEVBQUEsSUFBQSxLQUNULFVBQVcsT0FDWCxPQUFRLEtBQUEsRUFBQSxLQUFBLEVBR1QsZ0JBQ0MsSUFBSyxFQUNMLEtBQU0sRUFDTixXQUFZLElBQ1osTUFBTyxLQUNQLFFBQVMsS0FDVCxTQUFVLE1BQ1YsWUFBYSxFQUNiLFFBQVMsSUFBQSxJQUNULFFBQVMsR0FDVCxVQUFXLElGNUJaLHlCQUNDLFNBQ0MsUUFBUyxNR2tCVixvQ0hiQSxTQUNDLFFBQVMsS0FFVixJQUNDLFVBQVcsS0FDWCxPQUFRIiwiZmlsZSI6InN0eWxlLmNzcyJ9 */
/*# sourceMappingURL=style.css.map */
@charset "UTF-8";/*! Theme Name: wp */abbr,address,article,aside,audio,b,blockquote,body,caption,cite,code,dd,del,dfn,dialog,div,dl,dt,em,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,html,i,iframe,img,ins,kbd,label,legend,li,mark,nav,object,ol,p,pre,q,samp,section,small,span,strong,sub,sup,table,tbody,td,tfoot,th,thead,time,tr,ul,var,video{font-size:1em;margin:0;padding:0;border:0;outline:0;-webkit-box-sizing:border-box;box-sizing:border-box}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section{display:block}html{font-size:62.5%}body{-webkit-text-size-adjust:100%}body,h1,h2,h3,h4,h5,h6,input,option,select,table,textarea{font-family:"ヒラギノ角ゴ Pro","Hiragino Kaku Gothic Pro","メイリオ",Meiryo,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}h1,h2,h3,h4,h5,h6{font-weight:700}input,option,select,table,textarea{line-height:1.1}ol,ul{list-style:none}blockquote,q{quotes:none}:focus{outline:0}ins{text-decoration:none}del{text-decoration:line-through}img{vertical-align:top}a{-webkit-transition:.3s ease-in-out;transition:.3s ease-in-out}a:hover{opacity:.8;-ms-filter:"alpha(opacity=80)"}#__bs_notify__{opacity:.3!important;font-size:5px!important;line-height:100%!important;padding:0 5px 0 5px!important;border-radius:0!important}.c-dev-title1{background:#000;color:#fff;line-height:1;padding:6px 0 6px 15px;font-size:1.6rem;margin:60px 0 20px 0}.c-dev-title2{background:#888;color:#fff;line-height:1;padding:6px 0 6px 30px;font-size:1.3rem;margin:50px 0 10px 0}.c-dev-message1{top:0;left:0;background:red;color:#fff;z-index:9999;position:fixed;line-height:1;padding:3px 6px;opacity:.6;font-size:8px}@media (min-width:768px){.sp-only{display:none}}@media screen and (max-width:767px){.pc-only{display:none}img{max-width:100%;height:auto}}
/*# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInN0eWxlLnNjc3MiLCIwX2Jhc2UvX3Jlc2V0LnNjc3MiLCIwX2Jhc2UvX2RldmVsb3Auc2NzcyIsIjBfYmFzZS9fbWl4aW4uc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiaUJBRUEscUJDaUJBLEtBQ0EsUUFvQ0EsUUFDQSxNQVNBLE1BOUJBLEVBbkJBLFdBWkEsS0E0Q0EsUUE1QkEsS0FDQSxLQWtCQSxHQWpCQSxJQUNBLElBa0NBLE9BcERBLElBZ0NBLEdBQ0EsR0FkQSxHQW1CQSxTQWVBLE9BQ0EsT0FmQSxLQW5DQSxHQUNBLEdBQ0EsR0FDQSxHQUNBLEdBQ0EsR0E4Q0EsT0F6REEsS0FpQ0EsRUE1QkEsT0FpQkEsSUFDQSxJQUNBLElBa0JBLE1BQ0EsT0FKQSxHQXNCQSxLQUhBLElBdERBLE9BaUNBLEdBekJBLEVBRUEsSUFXQSxFQUNBLEtBaUNBLFFBaENBLE1BeEJBLEtBeUJBLE9BQ0EsSUFDQSxJQWNBLE1BRUEsTUFLQSxHQUpBLE1BR0EsR0FGQSxNQVlBLEtBWEEsR0FYQSxHQVBBLElBZ0NBLE1BQ0MsVUFBVyxJQUNYLE9BQVEsRUFDUixRQUFTLEVBQ1QsT0FBUSxFQUNSLFFBQVMsRUFDVCxXQUFZLFdBR2IsUUFDQSxNQUNBLFFBQ0EsV0FDQSxPQUNBLE9BQ0EsT0FDQSxPQUlBLEtBSEEsS0FDQSxJQUNBLFFBRUMsUUFBUyxNQUdWLEtBQ0MsVUFBVyxNQUdaLEtBQ0MseUJBQTBCLEtBRzNCLEtBTUEsR0FDQSxHQUNBLEdBQ0EsR0FDQSxHQUNBLEdBVEEsTUFHQSxPQURBLE9BSEEsTUFFQSxTQVNDLFlBQWEsWUFBQSxDQUFBLDBCQUFBLENBQUEsTUFBQSxDQUFBLE1BQUEsQ0FBQSxXQUNiLHVCQUF3QixZQUN4Qix3QkFBeUIsVUFHMUIsR0FDQSxHQUNBLEdBQ0EsR0FDQSxHQUNBLEdBQ0MsWUFBYSxJQUlkLE1BR0EsT0FEQSxPQUhBLE1BRUEsU0FHQyxZQUFhLElBR2QsR0FDQSxHQUNDLFdBQVksS0FHYixXQUNBLEVBQ0MsT0FBUSxLQUdULE9BQ0MsUUFBUyxFQUdWLElBQ0MsZ0JBQWlCLEtBR2xCLElBQ0MsZ0JBQWlCLGFBR2xCLElBQ0MsZUFBZ0IsSUFHakIsRUFDQyxXQUFZLElBQUEsWUFFYixRQUNDLFFBQVMsR0FFVCxXQUFZLG9CQ2xLYixlQUNDLFFBQVMsYUFDVCxVQUFXLGNBQ1gsWUFBYSxlQUNiLFFBQVMsRUFBQSxJQUFBLEVBQUEsY0FDVCxzQkFBdUIsWUFDdkIsY0FBZSxZQUdoQixjQUNDLFdBQVksS0FDWixNQUFPLEtBQ1AsWUFBYSxFQUNiLFFBQVMsSUFBQSxFQUFBLElBQUEsS0FDVCxVQUFXLE9BQ1gsT0FBUSxLQUFBLEVBQUEsS0FBQSxFQUdULGNBQ0MsV0FBWSxLQUNaLE1BQU8sS0FDUCxZQUFhLEVBQ2IsUUFBUyxJQUFBLEVBQUEsSUFBQSxLQUNULFVBQVcsT0FDWCxPQUFRLEtBQUEsRUFBQSxLQUFBLEVBR1QsZ0JBQ0MsSUFBSyxFQUNMLEtBQU0sRUFDTixXQUFZLElBQ1osTUFBTyxLQUNQLFFBQVMsS0FDVCxTQUFVLE1BQ1YsWUFBYSxFQUNiLFFBQVMsSUFBQSxJQUNULFFBQVMsR0FDVCxVQUFXLElGNUJaLHlCQUNDLFNBQ0MsUUFBUyxNR2tCVixvQ0hiQSxTQUNDLFFBQVMsS0FFVixJQUNDLFVBQVcsS0FDWCxPQUFRIiwiZmlsZSI6InN0eWxlLmNzcyJ9 */
/*# sourceMappingURL=style.css.map */
<?php $pageid = "category-news"; ?>
<?php include(get_template_directory() . '/assets/include/header.php'); ?>
<div class="p-news">
<section class="c-mainvisual">
<div class="c-breadcrumb pc-only">
<ul class="c-breadcrumb__inner">
<?php if (function_exists('bcn_display')) {
bcn_display();
} ?>
</ul>
</div>
<div class="c-mainvisual__inner">
<h2 class="c-mainvisual__title">ニュース</h2>
</div>
</section>
<div class="container">
<aside class="side pc-only">
<div class="side__box">
<h3 class="side__mainttl">ニュース</h3>
<ul class="side__list">
<?php
$terms = get_terms("news_tax", $args = array(
'hide_empty' => false,
'orderby' => 'count',
'order' => 'DESC',
));
foreach ($terms as $term) {
$term_link = get_term_link($term);
if ($term->count > 0) { ?>
<li class="side__item">
<?php $clActive = ((get_queried_object()->slug) == ($term->slug)) ? "is-active" : ""; ?>
<a class="side__txt <?php echo $clActive; ?>" href="<?php echo esc_url($term_link); ?>"><?php echo $term->name; ?></a>
</li>
<?php } elseif ($term->count !== 0) { ?>
<li class="side__item"><?php echo $term->name; ?></li>
<?php }
} ?>
</ul>
</div>
</aside>
<main class="content">
<ul class="list">
<?php
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$args = array(
'post_type' => 'news',
'post_status' => 'publish',
'posts_per_page' => 10,
'tax_query' => array(array(
'taxonomy' => 'news_tax',
'field' => 'slug',
'terms' => get_queried_object()->slug,
)),
'order' => 'DESC',
'paged' => $paged,
);
$the_query = new WP_Query($args);
?>
<?php if ($the_query->have_posts()) :
while ($the_query->have_posts()) : $the_query->the_post(); ?>
<li class="list_item">
<a class="list_link" href="<?php the_permalink(); ?>">
<div class="list_info">
<div class="list_heading">
<p class="list_date"><?php echo get_the_date("Y.m.d"); ?> </p>
<?php
//$terms = get_the_terms(get_the_ID(), 'news_tax');
$terms = wp_get_post_terms($post->ID, 'news_tax', array('order' => 'DESC', 'orderby' => 'count'));
if ($terms && !is_wp_error($terms)) :
foreach ($terms as $term) { ?>
<p class="list_cat <?php echo $term->slug; ?>"><?php echo $term->name; ?></p>
<?php }
endif; ?>
</div>
<h3 class="list_title"><?php the_title(); ?></h3>
<div class="list_text">
<?php $content = get_the_content();
$input = strip_tags($content);
$output = strip_tags($content, "<a>");
echo $input; ?>
</div>
</div>
<div class="list_image">
<?php if (has_post_thumbnail()) {
the_post_thumbnail();
} else { ?>
<img src="/assets/img/news/img-news.jpg" alt="">
<?php } ?>
</div>
</a>
</li>
<?php
endwhile;
else : ?>
<p class="p-news__noevent">まだイベントはありません</p>
<?php endif;
wp_reset_postdata();
?>
</ul>
<?php wp_pagenavi(array(
'wrapper_class' => 'paging',
'query' => $the_query,
)); ?>
</main>
</div>
</div>
<script src="/common_previous/js/news.min.js"></script>
<?php $pageid = "category-news"; ?>
<?php include(get_template_directory() . '/assets/include/header.php'); ?>
<div class="p-news">
<section class="c-mainvisual">
<div class="c-breadcrumb pc-only">
<ul class="c-breadcrumb__inner">
<?php if (function_exists('bcn_display')) {
bcn_display();
} ?>
</ul>
</div>
<div class="c-mainvisual__inner">
<h2 class="c-mainvisual__title">ニュース</h2>
</div>
</section>
<div class="container">
<aside class="side pc-only">
<div class="side__box">
<h3 class="side__mainttl">ニュース</h3>
<ul class="side__list">
<?php
$terms = get_terms("news_tax", $args = array(
'hide_empty' => false,
'orderby' => 'count',
'order' => 'DESC',
));
foreach ($terms as $term) {
$term_link = get_term_link($term);
if ($term->count > 0) { ?>
<li class="side__item">
<?php $clActive = ((get_queried_object()->slug) == ($term->slug)) ? "is-active" : ""; ?>
<a class="side__txt <?php echo $clActive; ?>" href="<?php echo esc_url($term_link); ?>"><?php echo $term->name; ?></a>
</li>
<?php } elseif ($term->count !== 0) { ?>
<li class="side__item"><?php echo $term->name; ?></li>
<?php }
} ?>
</ul>
</div>
</aside>
<main class="content">
<ul class="list">
<?php
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$args = array(
'post_type' => 'news',
'post_status' => 'publish',
'posts_per_page' => 10,
'tax_query' => array(array(
'taxonomy' => 'news_tax',
'field' => 'slug',
'terms' => get_queried_object()->slug,
)),
'order' => 'DESC',
'paged' => $paged,
);
$the_query = new WP_Query($args);
?>
<?php if ($the_query->have_posts()) :
while ($the_query->have_posts()) : $the_query->the_post(); ?>
<li class="list_item">
<a class="list_link" href="<?php the_permalink(); ?>">
<div class="list_info">
<div class="list_heading">
<p class="list_date"><?php echo get_the_date("Y.m.d"); ?> </p>
<?php
//$terms = get_the_terms(get_the_ID(), 'news_tax');
$terms = wp_get_post_terms($post->ID, 'news_tax', array('order' => 'DESC', 'orderby' => 'count'));
if ($terms && !is_wp_error($terms)) :
foreach ($terms as $term) { ?>
<p class="list_cat <?php echo $term->slug; ?>"><?php echo $term->name; ?></p>
<?php }
endif; ?>
</div>
<h3 class="list_title"><?php the_title(); ?></h3>
<div class="list_text">
<?php $content = get_the_content();
$input = strip_tags($content);
$output = strip_tags($content, "<a>");
echo $input; ?>
</div>
</div>
<div class="list_image">
<?php if (has_post_thumbnail()) {
the_post_thumbnail();
} else { ?>
<img src="/assets/img/news/img-news.jpg" alt="">
<?php } ?>
</div>
</a>
</li>
<?php
endwhile;
else : ?>
<p class="p-news__noevent">まだイベントはありません</p>
<?php endif;
wp_reset_postdata();
?>
</ul>
<?php wp_pagenavi(array(
'wrapper_class' => 'paging',
'query' => $the_query,
)); ?>
</main>
</div>
</div>
<script src="/common_previous/js/news.min.js"></script>
<?php include(get_template_directory() . '/assets/include/footer.php'); ?>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment