How to exclude a genre from a Music Store page
-
I want this page to display every genre EXCEPT Poetry. I tried genre!=Poetry in the shortcode, but that didn’t work
The page I need help with: [log in to see the link]
-
Hello @johnfeaver,
Thank you very much for using our plugin. The current plugin version does not include an option to exclude a specific genre. The alternative would be to include the other genres except the one you want to exclude.
Ex.
[music_store columns="3" genre="genre-a,genre-b"]
Best regards.
This works for the initial page load. However, the Genre dropdown still shows all the genres in the store. Is there a way to filter that as well, so the given page only sees the subset of genres?
Hello @johnfeaver,
In the current plugin version, the alternative would be to hide the dropdown with genres from the filtering options.
Ex.
[music_store columns="3" genre="genre-a,genre-b" filter_by_genre="0"]
Best regards.
Thanks, that works great for my single-genre pages!
Actually, after more testing, this is not working consistently. I am using [music_store columns=5 genre=”Choral,Instrumental,Operetta,Wedding”] on feavers.net/ddf-music. At first, it works, then it goes into a mode in which I can no longer filter by genre, it only allows All genres and does not display the full list. NOTE: most of the songs are in two genres (e.g., Choral and Secular Choral). Do I need to list ALL of the genres and sub-genres in the shortcode?)
Hello @johnfeaver
I’m sorry, but the current plugin version filters by specific genres, not subgenres. The upcoming update for the plugin will also include subgenres.
The “All genres” option refers to the genres passed through the shortcode.
What is the version number of your plugin copy?
I visited the URL provided, and it includes more genres than Choral, Instrumental, Operetta, and Wedding.
Best regards.
Version 1.1.10.
Listing some/most of the genres in the shortcode is not working at all now, except for filtering out Petry and Teaching (which are “songs” on seperate pages). The only choice is All genres in the dropdown.
Hello @johnfeaver
Could you please send me a screenshot of the inserted shortcode? Note that you must use valid double quotes symbols in the shortcode attributes (
"
).Also, please provide the website information. You can access it via the menu option “Tools > Site Health”, and by pressing the “Copy to the clipboard” button in the “Info” section.
Best regards.
I don’t know how to paste in a screenshot (or Info, for that matter). I get a rectangle saying this block has encountered an error. I don’t see how to attach an image either.
Hello @johnfeaver
Invalid characters in shortcode attributes cause block errors in the page editor.
You can upload the screenshot to your server and insert a media block here in the WordPress editor, or you can contact us through the plugin website. Contact Us
Best regards.
Screenshot: https://feavers.net/wp-content/uploads/2024/02/Screenshot-2024-02-05-123540-300x221.png INFO: ### wp-core ### version: 6.4.3 site_language: en_US user_language: en_US timezone: +00:00 permalink: /%year%/%monthnum%/%day%/%postname%/ https_status: true multisite: false user_registration: 0 blog_public: 1 default_comment_status: open environment_type: production user_count: 2 dotorg_communication: true ### wp-paths-sizes ### wordpress_path: /home/feaversadmin520/public_html wordpress_size: 76.52 MB (80237184 bytes) uploads_path: /home/feaversadmin520/public_html/wp-content/uploads uploads_size: 409.82 MB (429729121 bytes) themes_path: /home/feaversadmin520/public_html/wp-content/themes themes_size: 62.18 MB (65196052 bytes) plugins_path: /home/feaversadmin520/public_html/wp-content/plugins plugins_size: 107.88 MB (113123689 bytes) database_size: 11.70 MB (12271616 bytes) total_size: 668.10 MB (700557662 bytes) ### wp-active-theme ### name: Divi (Divi) version: 4.23.4 (latest version: 4.24) author: Elegant Themes author_website: https://www.elegantthemes.com parent_theme: none theme_features: core-block-patterns, widgets-block-editor, block-templates, post-thumbnails, custom-background, automatic-feed-links, menus, title-tag, post-formats, woocommerce, wc-product-gallery-zoom, wc-product-gallery-lightbox, wc-product-gallery-slider, customize-selective-refresh-widgets, wp-block-styles, editor-style, widgets theme_path: /home/feaversadmin520/public_html/wp-content/themes/Divi auto_update: Disabled ### wp-themes-inactive (2) ### Twenty Twenty-Four: version: 1.0, author: the WordPress team, Auto-updates disabled Twenty Twenty-Three: version: 1.3, author: the WordPress team, Auto-updates disabled ### wp-mu-plugins (1) ### aios-firewall-loader.php: author: (undefined), version: (undefined) ### wp-plugins-active (10) ### All In One WP Security: version: 5.2.5, author: All In One WP Security & Firewall Team, Auto-updates enabled Classic Editor: version: 1.6.3, author: WordPress Contributors, Auto-updates enabled FiboSearch - AJAX Search for WooCommerce: version: 1.27.0, author: FiboSearch Team, Auto-updates disabled Music Store - Stripe Add On: version: 1.2.2, author: CodePeople, Auto-updates enabled Music Store - WordPress eCommerce: version: 1.1.10, author: CodePeople, Auto-updates enabled Search In Place: version: 1.1.9, author: CodePeople, Auto-updates enabled Themify - WooCommerce Product Filter: version: 1.4.3, author: Themify, Auto-updates enabled UpdraftPlus - Backup/Restore: version: 1.23.16, author: UpdraftPlus.Com, DavidAnderson, Auto-updates enabled WooCommerce: version: 8.5.2, author: Automattic, Auto-updates enabled WPForms Lite: version: 1.8.6.4, author: WPForms, Auto-updates disabled ### wp-media ### image_editor: WP_Image_Editor_GD imagick_module_version: Not available imagemagick_version: Not available imagick_version: Not available file_uploads: 1 post_max_size: 128M upload_max_filesize: 128M max_effective_size: 128 MB max_file_uploads: 20 gd_version: 2.3.3 gd_formats: GIF, JPEG, PNG, WebP, BMP, AVIF, XPM ghostscript_version: 8.70 ### wp-server ### server_architecture: Linux 2.6.32-954.3.5.lve1.4.89.el6.x86_64 x86_64 httpd_software: LiteSpeed php_version: 8.1.27 64bit php_sapi: litespeed max_input_variables: 10000 time_limit: 300 memory_limit: 768M max_input_time: -1 upload_max_filesize: 128M php_post_max_size: 128M curl_version: 7.87.0 OpenSSL/1.1.1w suhosin: false imagick_availability: false pretty_permalinks: true htaccess_extra_rules: true current: 2024-02-05T17:23:27+00:00 utc-time: Monday, 05-Feb-24 17:23:27 UTC server-time: 2024-02-05T17:23:25+00:00 ### wp-database ### extension: mysqli server_version: 5.6.51-cll-lve client_version: mysqlnd 8.1.27 max_allowed_packet: 268435456 max_connections: 500 ### wp-constants ### WP_HOME: undefined WP_SITEURL: undefined WP_CONTENT_DIR: /home/feaversadmin520/public_html/wp-content WP_PLUGIN_DIR: /home/feaversadmin520/public_html/wp-content/plugins WP_MEMORY_LIMIT: 40M WP_MAX_MEMORY_LIMIT: 768M WP_DEBUG: false WP_DEBUG_DISPLAY: true WP_DEBUG_LOG: false SCRIPT_DEBUG: false WP_CACHE: false CONCATENATE_SCRIPTS: undefined COMPRESS_SCRIPTS: undefined COMPRESS_CSS: undefined WP_ENVIRONMENT_TYPE: Undefined WP_DEVELOPMENT_MODE: undefined DB_CHARSET: utf8 DB_COLLATE: undefined ### wp-filesystem ### wordpress: writable wp-content: writable uploads: writable plugins: writable themes: writable mu-plugins: writable ### wpforms ### version: 1.8.6.4 lite: January 18, 2024 at 9:32 pm upload_dir: Writable total_forms: undefined total_submissions: undefined
Hello @johnfeaver
What DIVI module are you using to insert the shortcodes on the page? Could you please use the “DIVI Code Module”?
Best regards.
I was using a single Text module for this shortcode as well as for Search in Place. I’ve now split them into two separate Code modules. Same behavior: filters the page(s) to the desired genres, but does not allow the user to do any filtering of genres.
Hello @johnfeaver
I detected the issue cause. Taxonomies slugs (Genres, Albums, Artists,…) are case-sensitive. You must enter them in lowercase. However, after analyzing your screenshot, you entered them as capitalized words (the first letter in uppercase). We’ve released a plugin update that transforms the terms to lowercase before using them.
Please install the latest plugin update or modify the genres in the store shortcode.
Best regards.
The plugin update did the trick! I learned from this that the shortcode needs to use the slugs, not the full genre names. With that in mind, the page now works fully as expected. Thanks so much for your attention to this.
- The topic ‘How to exclude a genre from a Music Store page’ is closed to new replies.