add initial codes.
This commit is contained in:
31
module_loop_post_news.php
Normal file
31
module_loop_post_news.php
Normal file
@ -0,0 +1,31 @@
|
||||
<?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 ] -->
|
||||
<li <?php post_class(); ?>>
|
||||
<span class="newsDate">
|
||||
<?php $locale = get_locale();
|
||||
if ('en_US' == $locale ) { ?>
|
||||
<!--英語表示の時-->
|
||||
<?php the_time('m/d/Y'); ?>
|
||||
<?php } else { ?>
|
||||
<!--日本語表示の時 -->
|
||||
<?php the_time('Y年m月d日'); ?>
|
||||
<?php } ?>
|
||||
</span>
|
||||
<span class="newsTitle"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a><?php if( is_sticky() ) : ?>
|
||||
<span style="font-size: medium;" class="sticky-tag dashicons dashicons-admin-post"></span>
|
||||
<?php endif; ?>
|
||||
</span>
|
||||
</li>
|
Reference in New Issue
Block a user