跳到内容

Media2Layout

v0.1.1

nickpdx · 2009年6月18日 上架

This plugin facilitates the dynamic inclusion, on a per-Page basis, of media library artwork into predefined places in your site's theme.

正在使用
10 以下
评分
暂无
累计下载
1,771
最近更新
2009年6月20日
需要 WordPress 2.7+已测试到 2.7

贡献者

截图

The Media2Layout position admin screen
The Media2Layout position admin screen
Media2Layout annotation for position "campaign" in a custom theme
Media2Layout annotation for position "campaign" in a custom theme
Assigning image from media library to "campaign" position for a Page
Assigning image from media library to "campaign" position for a Page

Media2Layout facilitates the dynamic inclusion of media library artwork into predefined places in your site’s theme. It creates named positions (by default “campaign” and “header”) which can be assigned a media item per each Page.

  • Adds an admin menu item under Themes to edit your Position names
  • Adds a dropdown control when editing Pages to select the images for each Position in that Page

To insert the images into your theme, just add a bit of PHP code to your theme in the appropriate spot, for example:

<?php Media2Layout::banner('foo');?> 

For the position named “foo” this would print an tag for the media assigned to the Foo position of the current page (or print nothing if no media is assigned to that position). Currently it wraps the in a

<

div> with class “media2layout_[position-name]”.

Plums

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

导航

说明

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

© 2026 Plums