[WordPress] 外掛分享: User Social Profiles

首頁外掛目錄 › User Social Profiles
200+
安裝啟用
尚無評分
2655 天前
最後更新
問題解決
WordPress 4.0+ v0.1.5 上架:2015-11-13

內容簡介

要使用此外掛程式,您的佈景主題(或子佈景主題)必須支援。
只要使用 WordPress 的內建功能the_author_meta('profile-name'),就可以顯示使用者的其他設定檔。 ‘profile name’ 可以是 ‘twitter’, ‘facebook’, ‘googleplus’, ‘instagram’, ‘pinterest’。

程式碼範例(附上 Font Awesome 圖示):

<?php
$prefix_twitter_url = get_the_author_meta( 'twitter' );
$prefix_facebook_url = get_the_author_meta( 'facebook' );
$prefix_googleplus_url = get_the_author_meta( 'googleplus' );
$prefix_instagram_url = get_the_author_meta( 'instagram' );
$prefix_pinterest_url = get_the_author_meta( 'pinterest' );
?>
<?php if ( ! empty( $prefix_twitter_url ) ) : ?><a href="<?php the_author_meta( 'twitter' ) ?>"><span class="fa fa-twitter"></span></a><?php endif; ?>
<?php if ( ! empty( $prefix_facebook_url ) ) : ?><a href="<?php the_author_meta( 'facebook' ) ?>"><span class="fa fa-facebook"></span></a><?php endif; ?>
<?php if ( ! empty( $prefix_googleplus_url ) ) : ?><a href="<?php the_author_meta( 'googleplus' ) ?>"><span class="fa fa-google-plus"></span></a><?php endif; ?>
<?php if ( ! empty( $prefix_instagram_url ) ) : ?><a href="<?php the_author_meta( 'instagram' ) ?>"><span class="fa fa-instagram"></span></a><?php endif; ?>
<?php if ( ! empty( $prefix_pinterest_url ) ) : ?><a href="<?php the_author_meta( 'pinterest' ) ?>"><span class="fa fa-pinterest"></span></a><?php endif; ?>

您可以在這裡看到它的展示: https://pencil1.blogonyourown.com/author/robertsummer/

外掛標籤

開發者團隊

⬇ 下載最新版 (v0.1.5) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「User Social Profiles」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

To use this plugin – your theme (or child theme) must support it.
To display additional profiles for user you just need to use native WordPress function the_author_meta( 'profile-name' ) where ‘profile name’ can be ‘twitter’, ‘facebook’, ‘googleplus’, ‘instagram’, ‘pinterest’.
Code example (with Font Awesome Icons):





You can see it in action here: https://pencil1.blogonyourown.com/author/robertsummer/

文章
Filter
Mastodon