[WordPress] 外掛分享: Content Mixx

首頁外掛目錄 › Content Mixx
⚠ 此外掛已下架 — 不再更新維護,建議勿安裝。
全新外掛
安裝啟用
尚無評分
5444 天前
最後更新
問題解決
WordPress 2.3+ v0.2.1 上架:2008-02-27

內容簡介

這個外掛可以從你的 WordPress 安裝中擷取一或多個隨機文章/頁面,
參數:
from (string)
– 只顯示文章、頁面或兩者
– 可能的值:post | page
numberposts (integer)
– 要回傳的文章/頁面數量
categories (用逗號分隔的整數)
– 限定返回屬於參數中類別的文章
exclude (用逗號分隔的整數)
– 限定返回未歸類於參數中類別的文章

範例代碼:
<?php
$myposts = contentmixx( 'from=post&numberposts=2&categories=8' );
foreach( $myposts as $post ) {
setup_postdata( $post );
?>
<div class="sideBarPost">
<h3><a href="<?php the_permalink() ?>"><?php the_title() ?></a></h3>
<p><?php the_excerpt(); ?></p>
<p><a href="<?php the_permalink() ?>">閱讀全文...</a></p>
</div>
<?php
}
?>

<?php
$results = contentmixx('numberposts=3');
foreach($results as $post) :
setup_postdata($post);
?>
<h2><a href="<?php the_permalink(); ?>" id="post-<?php the_ID(); ?>"><?php the_title(); ?></a></h2>
<?php the_content(); ?>
<?php endforeach; ?>

請將任何錯誤或改進建議提交至 https://github.com/bmsterling/Content-Mixx/issues

需要客製化此外掛或需要創建一個外掛,請通過我的聯繫表格聯繫我,網址為 http://kenzomedia.com

還可透過 twitter,@bmsterling

致謝

版權所有 2007 Benjamin Sterling (http://benjaminsterling.com)

本程式是自由軟體,你可以重新分發它和/或修改它
根據 GNU 一般公眾授權條款的規定發布
自由軟體基金會,這是版本 2 的許可證,或
(在您的選擇下)任何更高的版本。

本程式散佈在希望它是有用的,
但是沒有任何保證;甚至不具有
適銷性或特定用途的隱含保證。

請參閱 GNU 一般公眾授權條款以獲取更多詳細信息:
http://www.gnu.org/licenses/gpl.txt

外掛標籤

開發者團隊

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

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

原文外掛簡介

This plugin retrieves one or more random post/page or both of them from your WordPress installation
Arguments:
from (string)
– show only posts, or pages, or both
– possible values: post | page
numberposts (integer)
– number of posts/pages to return
categories (integers, separated by commas)
– limits returned posts to posts filed under categories found in arguments
exclude (integers, separated by commas)
– limits returned posts to posts NOT filed under categories found in arguments
Sample Code:


Please submit any bugs or suggested improvements to https://github.com/bmsterling/Content-Mixx/issues
Need this plugin customized or need a plugin created, contact me via my contact form at http://kenzomedia.com
Also available through twitter, @bmsterling
Credits
Copyright 2007 Benjamin Sterling (http://benjaminsterling.com)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details:
http://www.gnu.org/licenses/gpl.txt

延伸相關外掛

文章
Filter
Apply Filters
Mastodon