フォーラムへの返信

3件の返信を表示中 - 1 - 3件目 (全3件中)
  • フォーラム: 使い方全般
    返信が含まれるトピック: お知らせで条件分岐のしかた
    トピック投稿者 nyan0

    (@nyan0)

    mimosafa様

    ご回答ありがとうございます。
    スラッグを指定してあげて、それにstyleをかけていくんですね!
    勉強になりました。

    フォーラム: 使い方全般
    返信が含まれるトピック: お知らせで条件分岐のしかた
    トピック投稿者 nyan0

    (@nyan0)

    こちらとこちらでよろしいでしょうか?
    ご教示お願いいたします。

    <?php
    $postType = get_post_type();
    if ($postType == 'post') {
    	$taxonomySlug = 'category';
    } else {
    	$taxonomies = get_the_taxonomies();
    	if ($taxonomies) {
    		foreach ( $taxonomies as $taxonomySlug => $taxonomy ) {}
    	} else {
    		$taxonomySlug = '';
    	}
    }
    $taxo_catelist = get_the_term_list( $post->ID, $taxonomySlug, ' ','','');
    ?>
    <li id="post-<?php the_ID(); ?>">
    <span class="infoDate"><?php echo esc_html( get_the_date() ); ?></span>
    <span class="infoCate"><?php echo $taxo_catelist; ?></span>
    <?php if ( is_user_logged_in() == TRUE ) : edit_post_link(__('Edit', 'biz-vektor'), '<span class="edit-link edit-item">[ ', ' ]</span>');endif ?>
    <span class="infoTxt"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></span>
    </li>
    <?php
    $postType = get_post_type();
    if ($postType == 'post') {
    	$taxonomySlug = 'category';
    } else {
    	$taxonomies = get_the_taxonomies();
    	if ($taxonomies) {
    		foreach ( $taxonomies as $taxonomySlug => $taxonomy ) {}
    	} else {
    		$taxonomySlug = '';
    	}
    }
    $taxo_catelist = get_the_term_list( $post->ID, $taxonomySlug, ' ','','');
    ?>
    <!-- [ .infoListBox ] -->
    <div id="post-<?php the_ID(); ?>" class="infoListBox ttBox">
    	<div class="entryTxtBox<?php if ( has_post_thumbnail()) echo ' ttBoxTxt haveThumbnail'; ?>">
    	<h4 class="entryTitle">
    	<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
    	<?php if ( is_user_logged_in() == TRUE ) : edit_post_link(__('Edit', 'biz-vektor'), '<span class="edit-link edit-item">[ ', ' ]</span>');endif ?>
    	</h4>
    	<p class="entryMeta">
    	<span class="infoDate"><?php echo esc_html( get_the_date() ); ?></span><span class="infoCate"><?php echo $taxo_catelist; ?></span>
    	</p>
    	<p><?php the_excerpt(); ?></p>
    	<div class="moreLink"><a href="<?php the_permalink(); ?>"><?php _e('Read more', 'biz-vektor'); ?></a></div>
    	</div><!-- [ /.entryTxtBox ] -->
    
    	<?php if ( has_post_thumbnail()) { ?>
    		<div class="thumbImage ttBoxThumb">
    		<div class="thumbImageInner">
    		<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail(); ?></a>
    		</div>
    		</div><!-- [ /.thumbImage ] -->
    	<?php } ?>
    </div><!-- [ /.infoListBox ] -->
    フォーラム: 使い方全般
    返信が含まれるトピック: お知らせで条件分岐のしかた
    トピック投稿者 nyan0

    (@nyan0)

    ご回答ありがとうございます。

    しかしちょっと理解が及ばず…もう少しお願いします。
    現在は下記の通りなのですが、どうやってcssが読み込まれてるかすらちょっと理解できない状況です。
    もしよろしかったら…教えていただきたいです。

    <?php
    /*-------------------------------------------*/
    /*	info
    /*-------------------------------------------*/
    $biz_vektor_options = biz_bektor_option_validate();
    
    if(isset($biz_vektor_options['infoTopCount']) && $biz_vektor_options['infoTopCount'] != 0):
    $infoTopCount = $biz_vektor_options['infoTopCount'];
    $loop = new WP_Query( array( 'post_type' => 'info', 'posts_per_page' => $infoTopCount, ) ); ?>
    <?php if ($loop->have_posts()) : ?>
    <div id="topInfo" class="infoList">
    <h2><?php echo esc_html($biz_vektor_options['infoLabelName']); ?></h2>
    <div class="rssBtn"><a href="<?php echo home_url(); ?>/feed/?post_type=info" id="infoRss" target="_blank">RSS</a></div>
    <?php
    if ( isset($biz_vektor_options['listInfoTop']) &&  $biz_vektor_options['listInfoTop'] == 'listType_set' ) { ?>
    	<?php while ( $loop->have_posts() ) : $loop->the_post();?>
    		<?php get_template_part('module_loop_post2'); ?>
    	<?php endwhile ?>
    <?php } else { ?>
    	<ul class="entryList">
    	<?php while ( $loop->have_posts() ) : $loop->the_post();?>
    		<?php get_template_part('module_loop_post'); ?>
    	<?php endwhile; ?>
    	</ul>
    <?php }
    $infoTopUrl = (isset($biz_vektor_options['infoTopUrl']) && $biz_vektor_options['infoTopUrl'])? $biz_vektor_options['infoTopUrl'] : home_url().'/info/';
    echo '<div class="moreLink right"><a href="'.esc_url($infoTopUrl).'">';
    printf( __( '%s List page', 'biz-vektor' ), esc_html($biz_vektor_options['infoLabelName']) );
    echo '</a></div>';
    ?>
    </div><!-- [ /#topInfo ] -->
    <?php endif;
    wp_reset_query();
    endif; // if ($infoTopCount != 0) :
    ?>
3件の返信を表示中 - 1 - 3件目 (全3件中)