跳到内容

TwentyTen Gallery Fix

v1.0

Dan-Lucian Stefancu · 2011年2月2日 上架

TwentyTen theme will break galleries with more then 3 columns (also 2 columns galleries look strange). This is a little fix.

正在使用
10+
评分
暂无
累计下载
2,922
最近更新
2011年2月3日
需要 WordPress 3.0+已测试到 3.0.5

截图

A gallery with 8 items, and 4 columns (150px thumbnails) ? twentyTen default
A gallery with 8 items, and 4 columns (150px thumbnails) ? twentyTen default
A gallery with 8 items, and 4 columns (150px thumbnails) ? twentyTen fixed
A gallery with 8 items, and 4 columns (150px thumbnails) ? twentyTen fixed
A gallery with 8 items, and 5 columns (100px thumbnails) ? twentyTen default
A gallery with 8 items, and 5 columns (100px thumbnails) ? twentyTen default
A gallery with 8 items, and 5 columns (100px thumbnails) ? twentyTen fixed
A gallery with 8 items, and 5 columns (100px thumbnails) ? twentyTen fixed

TwentyTen theme will break galleries with more then 3 columns (also 2 columns galleries look strange). This is a little fix.

TwentyTen, the default WordPress theme, removes the default dynamic styles from WordPress galleries, and adds some static CSS, so galleries with anything but 3 columns look broken. It?s not a WordPress bug, it is TwentyTen specific.

What is the problem? TwentyTen theme?s CSS sets all the gallery items width to 33%, so any gallery with more then 3 columns looks broken (the items are thrown on the next row), as the the total width of the gallery excedes the post width (4 x 33% = 132%).

This plugin adds some custom classes to galleries (eg. 4 columns: .width-25), and some CSS that fixes the width problem.

No configuration needed. Just upload, and install. The galleries will look as they should.

Plugin’s page

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums