這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

Post Format Gallery Widget

外掛說明

The Post Format Gallery Widget plugin creates the possibility for you to display images from your galleries inside posts saved under the format ‘Gallery’. You can select the number of images to display, the size of these images, shuffle their orders, the target of links (image file, permalink to attachment, permalink to post or maybe no linking), show captions and use one copy of the basic WordPress style for galleries, which will allow you to set up easily a number of columns.

Important: your theme must support the Gallery post format, otherwise it won’t work.

安裝方式

  1. Upload post-format-gallery-widget directory to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. Go to ‘Widgets’ menu and drag it to your sidebar

常見問題集

The widget only shows this message: “Your theme does not support the Gallery post format. Please add this support so you can choose your posts.”

Yes, that’s it. You have to enable support for the gallery post format on your theme. This plugin will only search for galleries inside a post saved under the post format Gallery.

Can I add / remove / change gallery classes?

Yes. Just use the pfgw_gallery_classes filter in your functions.php file:

/**
 * Add a new class to the gallery container
 *
 * @param array $classes 
 */
function mytheme_change_pfgw_classes( $classes ) {
    $classes[] = 'my-class';
    return $classes;
}
add_filter( 'pfgw_gallery_classes', 'mytheme_change_pfgw_classes' );
Does it only work with posts? What about other post types?

The default type is post. However, you can use pfgw_post_types filter in your functions.php file and then add or remove how many post types you wish. Just remember that your theme must support these post types as well.

/**
 * Add another post type to our gallery query
 *
 * @param array $post_types The post types for the query 
 */
function mytheme_add_post_types( $post_types ) {
    $post_types[] = 'page';
    return $post_types;
}
add_filter( 'pfgw_post_types', 'mytheme_add_post_types' );

使用者評論

這個外掛目前沒有任何使用者評論。

參與者及開發者

以下人員參與了開源軟體〈Post Format Gallery Widget〉的開發相關工作。

參與者

將〈Post Format Gallery Widget〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

變更記錄

1.1

  • Make style unique for our widget using class .widget_post_format_gallery

1.0

  • First version.