Wxd logo@X2

/ plugins

  • 新聞
  • 主機
  • 主題
  • 外掛
  • 論壇
  • 翻譯
  • 文件
  • 關於

·

登入

Tea Page Content

殼殼蟲 的頭像
殼殼蟲

·

2017 年 11 月 18 日

·

未分類外掛

[views]

Icon 256x256.jpg

Tea Page Content is a powerful plugin that allows create widget or shortcode with content of any page, post, etc, and customize look of blocks via template system. You can select one or more entries, choose template (or create your own) and display it by widget or shortcode. Templates presents very flexible system for appearance control.

Key features

  • Very flexible template system
  • Native support of all post types
  • Possibility to create your own templates
  • Developer and user friendly
  • Easy to use and beautiful UI

If you found a bug or have a suggestion, please create topic on forum or send me email (raymondcostner at gmail.com).

Documentation

You can find primary description at Other Notes tab, and details at Github Page.

Documentation

Shortcodes

There is just one shortcode tea_page_content. Below there is an example with basic parameters.
[tea_page_content template=」default」 order=」asc」 posts=」12,45,23″]
You also can used template variables (see Templates section at documentation) and options.

Parameters

There is some built-in options. Let』s take a closer look:

  • order allows you set entries order. All posts and pages will be sorted by date, and you can choose a direction – by ascending or by descending. Sorting by descending is a default behaviour.
  • template allows you choose layout which will look as you want. In shortcode just type full name of your template without extension, for example default or your-template-name.
  • show_page_thumbnail allows you enable or disable displaying thumbnail of entry. If you don』t want see page thumbnail, type show_page_thumbnail="false". Default – true.
  • show_page_content allows you enable or disable displaying content of entry. Default – true.
  • show_page_title allows you enable or disable displaying title of entry. Default – true.
  • linked_page_title allows you enable or disable linking title of entry. In other words, title will be link to full article. Default – false.
  • linked_page_thumbnail allows you enable or disable linking thumbnail of entry. In other words, thumbnail will be link to full article. Default – false.

Creating simplest custom template

By default plugin will be search custom templates in a folder named templates in your theme. For create the one just add into this directory a new file with name like tpc-{template-name}.php. Every template should be named by that mask! Then put in created file your code. For example:


    

For using your templates in shortcode, you need just choose it in widget or pass full filename (but without extension) in shortcode. For example:
template=」tpc-my-template」

Parameters in template

Above you can see very simple example of custom template with title and content parameters. But this is not all – there is a full list of allowed parameters which you can use.

  • $count – Count of all passed entries
  • $instance – Array with user defined and default parameters. There is all list of options from self-titled section above.
  • $template_variables – Array with template-level variables.
  • $caller – Special flag that determine a module that called template: from widget or from shortcode. Can be widget or shortcode.
  • $entries – List of posts, pages, etc.
    • title – Title of current entry
    • content – Content of current entry. When page have more tag, will be used the_content function, in other cases will be used the_excerpt
    • thumbnail – Thumbnail of entry (if exists)
    • link – Link of entry
    • id – Entry ID

Details & Filters

Because full manual is too long, you can see it at Github Page. Get details and updating information about new features includes filters, template-level variables and more.

文章釋出於:

2015 年 12 月 31 日

文章目錄

快速接入中國本土生態體系——

「文派葉子」

免費下載 · WPCY.COM

立即加入 50 萬中文社羣站點

您可能也喜歡…

  • Handy Archive Link

    Handy Archive Link

    殼殼蟲 的頭像
    殼殼蟲

    ·

    2025 年 10 月 28 日
  • Meteoprog Weather Widget

    Meteoprog Weather Widget

    殼殼蟲 的頭像
    殼殼蟲

    ·

    2025 年 10 月 28 日
  • Ultra Addons for WPForms

    Ultra Addons for WPForms

    殼殼蟲 的頭像
    殼殼蟲

    ·

    2025 年 10 月 28 日
  • NES Ciudades y Departamentos de Colombia

    NES Ciudades y Departamentos de Colombia

    殼殼蟲 的頭像
    殼殼蟲

    ·

    2025 年 10 月 28 日
  • Event Voting & Live Leaderboard by Clicksmith

    Event Voting & Live Leaderboard by Clicksmith

    殼殼蟲 的頭像
    殼殼蟲

    ·

    2025 年 10 月 28 日

訂單服務

  • 購物流程
  • 付款方式
  • 售後說明

媒體中心

  • 新聞動態
  • 官方影片
  • 開源軟體

服務支援

  • 自助服務檯
  • 託管維護
  • 建站服務

使用條款

  • 授權許可
  • 隱私條款
  • 法律宣告

關於公司

  • 工作室簡介
  • 加入我們
  • 聯絡方式

線上諮詢

週一至週五 9:30-17:30

Copyright © 2012-2025 薇曉朵外掛目錄 All Rights Reserved . 旗下網站