Commit 6475e1de by Orine Matsui

セミナー一覧・書籍一覧追加

parent fbe23a4a
...@@ -146,6 +146,11 @@ h2.heading-main-archive {font-size: 1.8rem;margin-bottom: 16px;} ...@@ -146,6 +146,11 @@ h2.heading-main-archive {font-size: 1.8rem;margin-bottom: 16px;}
.widget.widget_tag_cloud a {border: none!important;font-size: 1.4rem!important;border-radius: 0;background-color: #eee;font-family: YakuHanMPs,"ヒラギノ明朝 ProN","Hiragino Mincho ProN",YuMincho,"Yu Mincho","游明朝体","Sawarabi Mincho",sans-serif!important;font-weight: 600;} .widget.widget_tag_cloud a {border: none!important;font-size: 1.4rem!important;border-radius: 0;background-color: #eee;font-family: YakuHanMPs,"ヒラギノ明朝 ProN","Hiragino Mincho ProN",YuMincho,"Yu Mincho","游明朝体","Sawarabi Mincho",sans-serif!important;font-weight: 600;}
.widget.widget_tag_cloud a::before {display: none!important;} .widget.widget_tag_cloud a::before {display: none!important;}
.widget.xili_tdtc_widget a {display: inline-block;border: none!important;font-size: 1.4rem!important;border-radius: 0;background-color: #eee;font-family: YakuHanMPs,"ヒラギノ明朝 ProN","Hiragino Mincho ProN",YuMincho,"Yu Mincho","游明朝体","Sawarabi Mincho",sans-serif!important;font-weight: 600;padding: 10px;margin: 0 5px 5px 0;transition: .15s;line-height: 1.35;}
.widget.xili_tdtc_widget a::before {display: none!important;}
@media only screen and (max-width: 767px) { @media only screen and (max-width: 767px) {
.pickup3__box {flex-direction: column;} .pickup3__box {flex-direction: column;}
.pickup3__box .pickup3__item {display: flex;flex-direction: row;width: 100%;} .pickup3__box .pickup3__item {display: flex;flex-direction: row;width: 100%;}
...@@ -254,15 +259,100 @@ single.php ...@@ -254,15 +259,100 @@ single.php
/* afRank */
.content .afRank li:before,
.content .afTagBox__star {display: none;}
.content .afRank .afTagBox__header, .widgetAfRank .widgetAfTag__header {padding-left: 0;}
/* balloon */ /* balloon */
.content .balloon .balloon__text.balloon__blue {background-color: #eaf6fe;} .content .balloon .balloon__text.balloon__blue {background-color: #eaf6fe;}
.content .balloon .balloon__text-right.balloon__blue:before {border-right-color: #eaf6fe;} .content .balloon .balloon__text-right.balloon__blue:before {border-right-color: #eaf6fe;}
.content .balloon .balloon__text-left.balloon__blue:before {border-left-color: #eaf6fe;} .content .balloon .balloon__text-left.balloon__blue:before {border-left-color: #eaf6fe;}
.content .balloon .balloon__text {padding: 2rem;} .content .balloon .balloon__text {padding: 2rem;}
@media only screen and (max-width: 767px) {
.content .balloon .balloon__img {float: inherit; margin-left: 0; margin-right: 0;margin-bottom: 30px;}
.content .balloon .balloon__text, .content .gallery-item {float: inherit;}
.content .balloon .balloon__text {max-width: 100%;}
.content .balloon .balloon__img.balloon__img-right {float: right;}
.content .balloon .balloon__text-right::before,
.content .balloon-boder .balloon__text-right:after {transform: rotate(90deg);}
.content .balloon .balloon__text-left::before,
.content .balloon-boder .balloon__text-left:after {transform: rotate(-90deg);}
.content .balloon .balloon__text::before{top: -20px;}
.content .balloon-boder .balloon__text:after{top: -19px;}
.content .balloon .balloon__text-right::before {left: 20px;}
.content .balloon-boder .balloon__text-right:after {left: 20px;}
.content .balloon .balloon__text-left::before {right: 20px;}
.content .balloon-boder .balloon__text-left:after {right: 20px;}
}
/* afRank */
.content .afRank li:before,
.widgetAfRank li:before,
.afTagBox__star,
.afTagBox__number:before,
.afTagBox__number:after {display: none!important;}
.content .afRank .afTagBox__header, .widgetAfRank .widgetAfTag__header {padding-left: 0;}
.widgetAfTag__contentBox {display: block;margin-bottom: 10px;}
.widget_fit_tagrank_class .heading-widgetsimple {
font-size: 2.4rem!important;
border-bottom: 1px solid #191919;
padding-bottom: 6px!important;
margin-bottom: 32px!important;
}
.afTagBox,
.afTagBox__contentBox {display: block!important;border: none!important;}
.widgetAfRank {display: flex;flex-direction: row;}
.widgetAfRank li {width: 32%;margin: 0 2% 0 0;}
.widgetAfRank li:nth-child(3n) {margin-right: 0;}
.widgetAfRank .widgetAfTag__banner {width: 100%;}
.seminarList h2.heading-secondary,
.bookList h2.heading-secondary {color: #191919;border-color: #191919;}
.seminarList .afTagBox,
.bookList .afTagBox {position: relative;border: none;background: #FFF;padding: 0;}
.seminarList__list,
.bookList__list {display: flex;}
.seminarList__list .afTagBox {width: 32%;margin: 0 2% 0 0;}
.seminarList__list .afTagBox:nth-child(4n) {margin-right: 0;}
.bookList__list .afTagBox {width: 23.5%;margin: 0 2% 0 0;}
.bookList__list .afTagBox:nth-child(5n) {margin-right: 0;}
.seminarList__list .afTagBox__title,
.bookList__list .afTagBox__title,
.widgetAfRank .widgetAfTag__title {margin: 10px 0 0 0;font-size: 1.5rem;text-align: left;}
.seminarList__list .afTagBox__text,
.bookList__list .afTagBox__text,
.widgetAfRank .widgetAfTag__text {margin: 10px 0 0 0;width: 100%;font-size: 1.4rem;}
<?php <?php
////////////////////////////////////////////////////////
//タグランキングウィジェットアイテム ////////////////////////////////////////////////////////
////////////////////////////////////////////////////////
class fit_tagrank_class extends WP_Widget { //タグランキングウィジェットアイテム
function __construct() {
$widget_option = array('description' => 'タグランキングを表示'); ////////////////////////////////////////////////////////
parent::__construct( false, $name = '[THE]タグランキング', $widget_option );
} class fit_tagrank_class extends WP_Widget {
// 設定フォームを出力するメソッド function __construct() {
function form( $instance ) {
?> $widget_option = array('description' => 'タグランキングを表示');
<p>
<label for="<?php echo $this->get_field_id('title'); ?>">タイトル:</label> parent::__construct( false, $name = '[THE]タグランキング', $widget_option );
<input type="text" class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" value="<?php echo esc_attr( @$instance['title'] ); ?>">
</p> }
<p>
<?php
$args = array( 'post_type' => 'afRanking', 'posts_per_page' => -1 );
$ranklist = get_posts( $args ); // 設定フォームを出力するメソッド
echo '<label for="'.$this->get_field_name("tagrank").'">タグランキングID:</label>'; function form( $instance ) {
echo '<select class="widefat" id="'.$this->get_field_name("tagrank").'" name="'.$this->get_field_name("tagrank").'">';
foreach($ranklist as $rank): ?>
$rankId = $rank->ID;
$rankData = get_userdata($rankId); <p>
$selected = '';
if( @$instance['tagrank'] == $rankId ){ <label for="<?php echo $this->get_field_id('title'); ?>">タイトル:</label>
$selected = 'selected';
} <input type="text" class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" value="<?php echo esc_attr( @$instance['title'] ); ?>">
echo '<option '.$selected.' value="'.$rankId.'">'.$rank->post_title.'</option>';
endforeach; </p>
echo '</select>';
?> <p>
</p>
<?php
<?php
} $args = array( 'post_type' => 'afRanking', 'posts_per_page' => -1 );
// 設定を表示するメソッド $ranklist = get_posts( $args );
function widget( $args, $instance ) {
extract( $args );
echo $before_widget; echo '<label for="'.$this->get_field_name("tagrank").'">タグランキングID:</label>';
// タイトルを取得 echo '<select class="widefat" id="'.$this->get_field_name("tagrank").'" name="'.$this->get_field_name("tagrank").'">';
$title = NULL;
if(!empty($instance['title'])) { foreach($ranklist as $rank):
$title = apply_filters('widget_title', $instance['title'] );
} $rankId = $rank->ID;
// タイトルを表示
if ($title) { $rankData = get_userdata($rankId);
echo $before_title . $title . $after_title;
} $selected = '';
// タグランキングIDを取得 if( @$instance['tagrank'] == $rankId ){
$id = NULL;
if(!empty($instance['tagrank'])) { $selected = 'selected';
$id = $instance['tagrank'];
} }
// タグランキング情報を取得 echo '<option '.$selected.' value="'.$rankId.'">'.$rank->post_title.'</option>';
$tag_id = get_post_meta($id , 'afRanking_post' ,true);
$crown = get_post_meta($id , 'afRanking_crown', true); endforeach;
echo '<ul class="widgetAfRank widgetAfRank__crown'.$crown.'">'; echo '</select>';
if( isset($tag_id)) { ?>
foreach($tag_id as $tid){
</p>
$post = get_post($tid);
$title = get_the_title($tid);
$content = $post->post_content;
$banner = apply_filters('the_content', get_post_meta($tid, 'afTagFormat_banner', true)); <?php
$text = apply_filters('the_content', get_post_meta($tid, 'afTagFormat_text', true));
$d_id = get_post_meta($tid, 'afTagFormat_d_id', true); }
$d_title = get_post_meta($tid, 'afTagFormat_d_title', true);
$a_url = get_post_meta($tid, 'afTagFormat_a_url', true);
$a_title = get_post_meta($tid, 'afTagFormat_a_title', true);
// 設定を表示するメソッド
$counter = ''; function widget( $args, $instance ) {
$jquery = '';
if(!is_user_logged_in() && !is_bot()){ extract( $args );
$counter = set_post_views($tid);
$jquery = post_ajax_send($tid);
}
echo $before_widget;
?>
<li> // タイトルを取得
<div class="widgetAfTag afTag-<?php echo $tid ?>">
<div class="widgetAfTag__header"> $title = NULL;
<div class="widgetAfTag__title"><?php echo $title ?></div>
</div> if(!empty($instance['title'])) {
<div class="widgetAfTag__contentBox">
<div class="widgetAfTag__banner"><?php echo $banner ?></div> $title = apply_filters('widget_title', $instance['title'] );
<div class="widgetAfTag__text"><?php echo $text ?></div>
</div> }
<div class="widgetAfTag__btnList">
<?php if(!empty($d_id) && !empty($d_title)){echo '<a class="widgetAfTag__btnDetail" href="'.get_permalink($d_id).'">'.$d_title.'</a>';} ?> // タイトルを表示
<?php if(!empty($a_url) && !empty($a_title)){echo '<a class="widgetAfTag__btnAf" href="'.$a_url.'" target="_blank">'.$a_title.'</a>';} ?>
</div> if ($title) {
<?php echo $jquery ?><?php echo $counter ?>
</div> echo $before_title . $title . $after_title;
</li>
<?php }
}
}
echo '</ul>';
echo $after_widget; // タグランキングIDを取得
} $id = NULL;
// 設定を保存するメソッド if(!empty($instance['tagrank'])) {
function update( $new_instance, $old_instance ) {
return $new_instance; $id = $instance['tagrank'];
}
}
}
add_action( 'widgets_init', function(){register_widget('fit_tagrank_class' );});
// タグランキング情報を取得
$tag_id = get_post_meta($id , 'afRanking_post' ,true);
$crown = get_post_meta($id , 'afRanking_crown', true);
echo '<ul class="widgetAfRank widgetAfRank__crown'.$crown.'">';
if( isset($tag_id)) {
foreach($tag_id as $tid){
$post = get_post($tid);
$title = get_the_title($tid);
$content = $post->post_content;
$banner = apply_filters('the_content', get_post_meta($tid, 'afTagFormat_banner', true));
$text = apply_filters('the_content', get_post_meta($tid, 'afTagFormat_text', true));
$d_id = get_post_meta($tid, 'afTagFormat_d_id', true);
$d_title = get_post_meta($tid, 'afTagFormat_d_title', true);
$a_url = get_post_meta($tid, 'afTagFormat_a_url', true);
$a_title = get_post_meta($tid, 'afTagFormat_a_title', true);
$counter = '';
$jquery = '';
if(!is_user_logged_in() && !is_bot()){
$counter = set_post_views($tid);
$jquery = post_ajax_send($tid);
}
?>
<li>
<div class="widgetAfTag afTag-<?php echo $tid ?>">
<div class="widgetAfTag__contentBox">
<div class="widgetAfTag__banner"><a href="<?php echo $a_url ?>" target="_blank"><?php echo $banner ?></a></div>
<div class="widgetAfTag__textBox">
<div class="widgetAfTag__title"><?php echo $title ?></div>
<div class="widgetAfTag__text"><?php echo $text ?></div>
<div class="widgetAfTag__btnList">
<?php if(!empty($d_id) && !empty($d_title)){echo '<a class="widgetAfTag__btnDetail" href="'.get_permalink($d_id).'">'.$d_title.'</a>';} ?>
<?php if(!empty($a_url) && !empty($a_title)){echo '<a class="widgetAfTag__btnAf" href="'.$a_url.'" target="_blank">'.$a_title.'</a>';} ?>
</div>
</div>
</div>
<?php echo $jquery ?><?php echo $counter ?>
</div>
</li>
<?php
}
}
echo '</ul>';
echo $after_widget;
}
// 設定を保存するメソッド
function update( $new_instance, $old_instance ) {
return $new_instance;
}
}
add_action( 'widgets_init', function(){register_widget('fit_tagrank_class' );});
...@@ -125,6 +125,20 @@ ...@@ -125,6 +125,20 @@
<?php the_content(); ?> <?php the_content(); ?>
<?php if( get_field('seminar-list') ) { ?>
<div class="seminarList">
<h2 class="heading heading-secondary heading-main-archive">セミナー一覧</h2>
<div class="seminarList__list"><?php the_field('seminar-list'); ?></div>
</div>
<?php } ?>
<?php if( get_field('book-list') ) { ?>
<div class="bookList">
<h2 class="heading heading-secondary heading-main-archive">書籍一覧</h2>
<div class="bookList__list"><?php the_field('book-list'); ?></div>
</div>
<?php } ?>
</section> </section>
<?php endwhile; endif; ?> <?php endwhile; endif; ?>
...@@ -132,7 +146,6 @@ ...@@ -132,7 +146,6 @@
<?php if (get_option('fit_pageShare_bottom') == 'on') : ?> <?php if (get_option('fit_pageShare_bottom') == 'on') : ?>
<aside class="social-bottom"><?php fit_share_btn(); ?></aside> <aside class="social-bottom"><?php fit_share_btn(); ?></aside>
......
...@@ -391,6 +391,20 @@ ...@@ -391,6 +391,20 @@
<?php the_content(); ?> <?php the_content(); ?>
<?php if( get_field('seminar-list') ) { ?>
<div class="seminarList">
<h2 class="heading heading-secondary heading-main-archive">セミナー一覧</h2>
<div class="seminarList__list"><?php the_field('seminar-list'); ?></div>
</div>
<?php } ?>
<?php if( get_field('book-list') ) { ?>
<div class="bookList">
<h2 class="heading heading-secondary heading-main-archive">書籍一覧</h2>
<div class="bookList__list"><?php the_field('book-list'); ?></div>
</div>
<?php } ?>
</section> </section>
<?php <?php
......
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