[WordPress] 外掛分享: Audio Album

首頁外掛目錄 › Audio Album
WordPress 外掛 Audio Album 的封面圖片
4,000+
安裝啟用
★★★★★
5/5 分(12 則評價)
266 天前
最後更新
問題解決
WordPress 4.9+ v1.5.1 上架:2013-11-11

內容簡介

該外掛最初是為 Dave Draper 的網站製作的,該網站在音樂頁面上使用了這個外掛。如需示例,請參閱以 Dave 為主唱和貝斯的 Wild Bunch 專輯頁面。

Audio Album 使用包含在 WordPress 核心文件中的 mediaelement.js 的默認音頻功能,使您可以將一組音頻文件(MP3 等)格式化為單個專輯樣式的區塊。顏色可以在 WordPress 自訂器的 Audio Album 部分中自定義。

您可以在您的網站上顯示所需數量的 Audio Album,每個頁面上可以有多個專輯。

使用方法:

有兩個短碼可用 [audioalbum] 和 [audiotrack]。

此短碼是必需的,可以用作 [audiotrack] 短碼之前的標題。

以下是此外掛特定的幾個參數:

- 標題
- 詳細資料
- 日期

[audiotrack] 短碼作為 WordPress 短碼的包裝器,因此使用與 短碼相同的參數,以及以下是此外掛特定的幾個參數:

- 標題
- 寬度
- 高度
- 作曲者
- 按鈕文本
- 按鈕連結

還可以以與默認 WordPress 短碼相同的方式使用以下屬性:

- src
- mp3
- ogg
- wma
- m4a
- wav
- loop
- autoplay
- preload

示例:

[audioalbum title="The Album Title" detail="Some other Details" date="2022"]

[audiotrack title="Song One" songwriter="credit" mp3="http://domain.com/wp-content/uploads/audiofile1.mp3"]

[audiotrack title="Song Two" songwriter="credit" mp3="http://domain.com/wp-content/uploads/audiofile2.mp3"]

歌詞/其他資訊在彈出視窗中:

可以向 [audioalbum] 短碼添加一些額外的參數,以選擇性地添加一個按鈕,讓訪問者打開每個音軌上的連結,在您的網站中使用彈出視窗打開頁面。

首先,您需要創建頁面、文章或自定義文章類型的文章,並記下文章/頁面 ID。

可以添加四個參數/值對,以將 [audiotrack] 短碼添加到彈出鏈接中:

- 按鈕連結
- 按鈕文字
- 寬度
- 高度

將目標頁面/文章的 ID 輸入為 buttonlink 參數的值。僅在為 buttonlink 參數設置值時才會顯示按鈕。

buttontext 属性是可选的,如果未指定任何值,則按鈕上會顯示默认的“歌詞”标签。

也可以使用可选的寬度和高度属性指定彈出視窗的尺寸。如果未給出值,則將使用默認值,寬度為 520 像素,高度為 400 像素。

如果您的網站使用 Genesis 子主題,做為小禮物,彈出頁面將應用不帶標題、菜單、側邊欄或其他分散注意力的落地頁面模板。

示例:

[audiotrack title="Song One" songwriter="credit" mp3="http://domain.com/wp-content/uploads/audiofile1.mp3" buttonlink="808"]

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.5.1) 或搜尋安裝

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

原文外掛簡介

The plugin was originally created for Dave Draper’s website where it is used on the music pages. For an example, please see the page for the Wild Bunch album featuring Dave on vocals and bass.
Audio Album uses the default audio capabilities of mediaelement.js included with core WordPress files and enables you to style a group of audio files (MP3 etc) as single block formatted as an album. The colours can be customized in the Audio Album section of the WordPress customizer.
You can display as many Audio Albums as you need on your site, with multiple albums on each page.
Usage:
There are two shortcodes that can be used [audioalbum] and [audiotrack]
[audioalbum]

This shortcode is required and can be used as a header before the [audiotrack] shortcodes.

title
detail

date
[audiotrack]
This acts as a wrapper to the WordPress shortcode so uses the same parameters as the shortcode, plus the following which are specific to this plugin:

title

width
height
songwriter
buttontext
buttonlink

The following attributes can also be used in the [audiotrack] shortcode in the same way in which they are used in the default WordPress shortcode:

src
mp3
ogg
wma
m4a
wav
loop
autoplay
preload

Example
[audioalbum title="The Album Title" detail="Some other Details" date="2022"]

[audiotrack title="Song One" songwriter="credit" mp3="http://domain.com/wp-content/uploads/audiofile1.mp3"]

[audiotrack title="Song Two" songwriter="credit" mp3="http://domain.com/wp-content/uploads/audiofile2.mp3"]

Lyrics / other info in a popup window
There are some additional parameters which can be added to the [audioalbum] shortcode to optionally add a button to allow a visitor to open a link on each audio track to open a page in your site within a popup window.
You need to first create the page, post, or custom post type post and make a note of the post/page id.
There are four parameter/value pairs which can be added to the [audiotrack] shortcode to make a popup link

buttonlink
buttontext
width
height

Enter the page/post id of the target page as the value for the buttonlink parameter. A button will only be shown when a value is set for the buttonlink parameter.
The buttontext attribute is optional, if no value is specified, the default label of ‘lyrics’ will be shown on the button.
The dimensions of the popup window can also be specified using optional width and height attributes. If no values are given, default values of 520px (width) and 400px (height) will be used.
If your site is using a Genesis child theme, as a little bonus, a landing-page template without a masthead, menus, sidebars or other distractions will be applied to the popup page.
Example with default ‘lyrics’ button
[audiotrack title="Song One" songwriter="credit" mp3="http://domain.com/wp-content/uploads/audiofile1.mp3" buttonlink="808"]

Example with custom button and custom popup window dimensions
[audiotrack title="Song Two" songwriter="credit" mp3="http://domain.com/wp-content/uploads/audiofile2.mp3" buttonlink="909" buttontext="linklabel" width="300" height="500"]

The parameters used with the standard native WordPress audio shortcode outlined in the codex: Audio Shortcode page can also be used in the [audiotrack] shortcode.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon