Commit b419bd4f by Orine Matsui

WPのテーマを追加

/public_html/achievement.co.jp/wp-content/themes/
parent da89d65e
Showing with 145 additions and 0 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>
</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 $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/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
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