-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharchive.php
62 lines (62 loc) · 3.18 KB
/
archive.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?php
get_header();
$user_lastname = get_the_author_meta('user_lastname');
$user_firstname = get_the_author_meta('user_firstname');
$user_url = get_the_author_meta('user_url');
$description = get_the_author_meta('description');
?>
<div id="content">
<div class="wrap">
<div class="header_container">
<header class="page-header">
<?php breadcrumb(); ?>
<?php if (is_author()) : // 著者ページの場合
?>
<div class="header-profile">
<div class="header-profile-icon">
<img title="<?php the_author(); ?>" class="author-photo" width="120px" height="120px" src="<?php echo get_avatar_onlyurl(get_the_author_id(), 120); ?>" alt="<?php the_author_meta('display_name'); ?>">
</div>
<div class="header-profile-text">
<h1 class="page-title mcfont"><?php the_author(); ?></h1>
<p><?php the_author_meta('description'); ?></p>
<ul class="header-sns">
<?php if (get_the_author_meta('twitter')) : ?>
<li>
<a href="https://twitter.com/<?php the_author_meta('twitter'); ?>"><i class="fa-brands fa-twitter"></i></a>
</li>
<?php endif; ?>
<?php if (get_the_author_meta('instagram')) : ?>
<li>
<a href="<?php the_author_meta('instagram'); ?>"><i class="fa-brands fa-instagram"></i></a>
</li>
<?php endif; ?>
<?php if (get_the_author_meta('youtube')) : ?>
<li>
<a class="header-icon" href="<?php the_author_meta('youtube'); ?>"><i class="fa-brands fa-youtube"></i></a>
</li>
<?php endif; ?>
<?php if (get_the_author_meta('user_url')) : ?>
<li>
<a class="header-icon" href="<?php the_author_meta('user_url'); ?>"><i class="fa-solid fa-link"></i></a>
</li>
<?php endif; ?>
</ul>
</div>
</div>
<?php else : // その他
?>
<h1 class="page-title">「<?php single_cat_title(); ?>」の記事一覧</h1>
<?php
if (!is_paged()) {
// 説明文(2ページ目以降には非表示)
the_archive_description('<div class="entry-content">', '</div>');
}
?>
<?php endif; ?>
</header>
<?php
get_template_part('parts/post-grid');
?>
</div>
</div>
<?php get_footer();