开发者 | celloexpressions |
---|---|
更新时间 | 2024年7月13日 09:58 |
PHP版本: | 6.1 及以上 |
WordPress版本: | 6.6 |
版权: | GPLv2 |
sheet_music
post type directly with custom templates allow for infinite possibilities. Blocks are also available so that you can optionally build custom layouts with the site editor and block themes.
Whether you're a composer/arranger publishing your works online, a community or school orchestra sharing music with your members, or work with music in any other way, the Sheet Music Library plugin provides an easy, flexible way to manage and share your content.
Note that this plugin was designed with classical music in mind in particular, but it can be used in much broader contexts. It was built for the Cello Expressions Sheet Music Library, which provides a good example of what it can do and how it can look on the front end. The backend UI is just as much of a reason to try this plugin, with its seamless integration with WordPress core features.
/wp-content/plugins/
directorySheet Music Library 2.0 adds support for the block editor. Support for blocks within sheet music posts' content is stable. Most other block related features -- sheet music library template blocks -- are intended for use in block-based theme templates or in custom views with query blocks. The built-in block patterns provide a good start for typical use cases, such as a query loop to feature pieces in a particular taxonomy.
Sheet Music Library 2.0+ includes blocks and patterns that enable you to create a fully customized theme that supports the Sheet Music Library plugin within the block-based site editor. This is a beta interface, and includes the rough edges that come with the current state of block themes. If you build sheet music single and archive templates in the block editor, you need to declare theme support for sheet_music_library
to disable the the_content
filter-based templating that the plugin provides for compatibility with classic themes. There is a UI option in the customizer (which allows you to live-preview the impact of changing this option), so that this is possible without digging into the code. Distributed themes that integrate with this plugin are encourage to include this flag by default.
This plugin has a handy feature that generates images from PDF files that are uploaded. However, it requires a server-side image processing feature called Imagick (or ImageMagick). If image previews of PDFs aren't working, this feature is likely missing. Contact your host to see whether it can be enabled. In some cases, your best option may even be to switch to a host that supports this feature, if image previews of PDFs are a must-have feature. Note that WordPress core added a similar feature for all PDF uploads, inspired by this plugin, in version 4.7. The core feature will show PDF thumbnails in the media library for files uploaded after 4.7 was installed. This plugin maintains a separate version of the PDF image, but may utilize the core feature in the future.
Out of the box, the Sheet Music Library doesn't include E-Commerce functionalities, as it was built for a free sheet music library. However, this functionality could be added on to the plugin with either an add-on plugin or by restricting access to the actual PDF file downloads or by using custom front-end handling with a custom theme or child theme.
To display all sheet music in a table view, write the following on its own line in a post/page content area: [all_sheet_music]
. If you have a lot of sheet music, you could also use [latest_sheet_music number="10"]
and specify the number of pieces to display. If you want to get a playlist of the audio files associated with sheet music, use [sheet_music_audio_playlist]
. This shortcode also supports a genre argument - give it the slug (URL extension) for the genre you want to display: [sheet_music_audio_playlist genre="classical"]
. Generally speaking, it is better to use post type archives and taxonomy views where possible (see the installation instructions for details). In version 2.0 and newer, you can also use Query Loop blocks (with sheet music library post template patterns) to achieve a similar result (minus the table view).
.condensed-audio
CSS class and is included in some block patterns.