春日井ナビみてコード
カスタム
<!-- 投稿者プロフィール -->
<div class="blog_prof">
<div class="blog_prof_sam">
<?php echo get_avatar(get_the_author_id(), 100); ?>
</div>
<div class="blog_prof_disp">
<div class="blog_nickname">
<!----ブログネーム------>
<div style="font-size: 90%;">
編集者</div>
<a href="<?php echo get_author_posts_url( get_the_author_id() ); ?>">
<?php
echo get_the_author_meta('nickname');
?> </a>
<br />
<div class="mob_both">
<!-- disp -->
<?php the_author_meta('description'); ?>
<br>
<!-- sns -->
<? if(get_the_author_meta('twitter')):?>
<a href="<?php the_author_meta('twitter'); ?>" target="_blank">twitter</a>
<? endif;?>
<? if(get_the_author_meta('facebook')):?>
<a href="<?php the_author_meta('facebook'); ?>" target="_blank">facebook</a>
<? endif;?>
<? if(get_the_author_meta('instagram')):?>
<a href="<?php the_author_meta('instagram'); ?>" target="_blank">instagram</a>
<? endif;?>
<? if(get_the_author_meta('tumblr')):?>
<a href="<?php the_author_meta('tumblr'); ?>" target="_blank">tumblr</a>
<? endif;?>
</div>
</div>
</div>
</div>
<!-- //投稿者プロフィール -->
プラグインは
Simple Local Avatars
DLして入れた古いけど
https://ja.wordpress.org/plugins/simple-local-avatars/
sns出すために
アドバンスカスタムフィールドで
ユーザーに新規カスタムフィールドをつけて あればで分岐
ここにhttp://techmemo.biz/wordpress/author-meta-display/
the_author_metaで取得とあったが
出力してしまうので
get_the_author_metaというのを発見しつかった。
上記こーどのまま
オーサーアカイブでも使ったが
<?php the_author_meta('display_name',$author); ?>
こうした方が本当かも?$authorなくてもでたからいいか?
アーカイブのURLがユーザーIDになるので
Edit Author Slug
を入れて変更した。プロフページにて
http://hublog.biz/bwpb/user-settings/
css
//ユーザー
.blog_prof{ margin-top: 50px; overflow: hidden ; a{color: #1b95e0} a:hover{color: #1b95e0;} line-height: 2}
.blog_prof_sam{float: left; margin-right: 30px; img{.border-radius(50%)}}
.mob_both{font-size: 80%; clear: both;}
.blog_prof_disp{overflow: hidden; }
@media screen and (max-width: 736px) {.blog_prof_disp{overflow: initial; margin-top: 16px;}
.mob_both{padding-top: 6px;}
}