[WordPress] 外掛分享: WP Over Network

首頁外掛目錄 › WP Over Network
WordPress 外掛 WP Over Network 的封面圖片
90+
安裝啟用
★★★★★
5/5 分(2 則評價)
4617 天前
最後更新
問題解決
WordPress 3.5+ v0.4.4 上架:2013-07-06

內容簡介

新增從網站網絡中取得文章資訊的功能。支援小工具、短碼以及自訂原始功能。

使用以下內容:

在範本中
<?php

get_header();
the_post();

?>
<section id="content-primary">
<header id="page-header">
<h1><?php the_title() ?></h1>
</header>
<?php

// 取得最近文章項目,無主機網誌的頁面與文章。設定 "affect_wp_query = true",可使用 wp_pagenavi。
$posts = wponw::get_posts('exclude_blog_ids=1&post_type=post,page&affect_wp_query=true');

wp_pagenavi();

?>
<?php if ( ! empty ( $posts ) ) : ?>
<section class="post-list">
<?php
foreach ( $posts as $post ) :
wponw::setup_blog_and_postdata( $post );
?>
<section id="post-<?php the_ID() ?>" <?php post_class() ?>>
<h2>【<?php echo $post->blog_name ?>】</h2>
<h1><a href="<?php the_permalink() ?>"><?php the_title() ?></a></h1>
<?php echo get_the_excerpt() ?>
</section>
<?php
wponw::restore_blog_and_postdata();
endforeach;
?>
</section>
<?php else : ?>
<p>抱歉,沒有文章。</p>
<?php endif; # End of empty( $posts ) ?>

</section>
<?php

wp_reset_query();
get_sidebar();
get_footer();

使用短碼

使用預設顯示。

[wponw_recent_post_list]

引數,與wponw::render_post_archive_to_string相同。

使用您的範本檔案,包括三種文章類型

[wponw_recent_post_list numberposts=8 post_type=products,promotions,information template=在您的佈景主題中的範本檔案名稱]

注意:在您的佈景主題中的範本檔案名稱中不要包含檔案擴展名。

如果您想使用自己的渲染函數。

[wponw_recent_post_list numberposts=5 post_type=products renderer=您的渲染函數]

建立一個帶有頁面的封存頁面。

您可以建立新頁面,並在文章內容中撰寫以下短碼。

[wponw_recent_post_list post_type=post exclude_blog_ids=1 affect_wp_query=true]

聯繫方式

在twitter上聯繫@yuka2py。

外掛標籤

開發者團隊

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

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

原文外掛簡介

Add ability to get posts from over your network sites. Supports widget, shortcode, and customizable original function.
Use the following:
In template


>

blog_name ?>】



Sorry, there is no post.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon