degriznet / m2_categoryfaq
Magento 2: FAQ questions and answers per category, rendered as an accordion with FAQPage schema markup.
Package info
github.com/DegrizNet/m2_categoryfaq
Type:magento2-module
pkg:composer/degriznet/m2_categoryfaq
Requires
- php: ~8.1.0||~8.2.0||~8.3.0||~8.4.0||~8.5.0
- magento/framework: ^103.0
- magento/module-catalog: ^104.0
- magento/module-eav: ^102.1
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Free and open source (MIT). Works with Luma and Hyvä out of the box, no compatibility package needed. Made by Degriz, a Magento and Hyvä agency from Slovenia.
Install with Composer
composer require degriznet/m2_categoryfaq
bin/magento module:enable Magelan_CategoryFaq
bin/magento setup:upgrade
bin/magento cache:flush
The FAQ Schema Markup module for Magento 2 integrates structured data for frequently asked questions into your Magento store. This module helps search engines understand the content of your FAQs, potentially enhancing visibility in search results with rich snippets.
Features
- Schema Markup for FAQs: Adds structured data for questions and answers to enhance SEO.
- Easy Configuration: Simple settings to manage your FAQ entries through the Magento admin panel.
- Improved Search Visibility: Helps search engines display FAQs as rich results, increasing click-through rates.
This module implements FAQPage Schema Markup, allowing search engines to display your FAQ section more effectively in search results.
Author
Anže Voh
Magento eCommerce developer at Degriz
Installation
-
Download the Module: Obtain the FAQ Schema Markup module from this repository.
-
Upload the Files: Copy the contents of the module to the
app/code/Magelan/CategoryFaq/folder where your Magento store is located. -
Enable the Module: Run the following commands in the terminal to enable the module:
php bin/magento module:enable Magelan_CategoryFaq php bin/magento setup:upgrade ... php bin/magento cache:flush
-
Configure FAQs: Go to Catalog / Categories and select the category and "FAQ" tab to add and manage your FAQ entries.
-
Refresh Cache: Log out and log back into the Magento administration panel and refresh the cache.
-
Verify Installation: Use Google’s Rich Results Test tool to check if the FAQ schema is implemented correctly on your site. FAQPage Schema test
Themes
-
Luma and Luma-based themes:
category_faq.phtml, an accordion opened by a small RequireJS script. -
Hyvä (1.1 and newer):
hyva/category_faq.phtml, native<details>elements, no JavaScript.hyva_catalog_category_view.xmlswitches the template and drops the Luma stylesheet. The module needs no Hyvä package: without Hyvä these files are never read.The Hyvä template uses Tailwind classes, so the module registers itself for the theme's Tailwind build. After installing or updating it, regenerate the list and rebuild the theme CSS:
php bin/magento hyva:config:generate cd app/design/frontend/<Vendor>/<theme>/web/tailwind && npm run build
Notice
- Always test the module on a development version before deploying it to your production environment.
- Ensure that your FAQs comply with search engine guidelines for structured data.
License
See LICENSE.txt.
Disclaimer
- This module is provided "as is," without any warranty of any kind, express or implied. Use it at your own risk.
- The author takes no responsibility for any issues or problems that arise from using this module.
- Free support is not provided.
- You are free to use and modify this module, but you cannot resell it.
Additional Information
I specialize in custom Magento development and have successfully completed numerous projects tailored to optimize eCommerce functionalities. My services include:
- Custom Module Development: Creating tailored solutions to meet your specific business needs.
- Integration Services: Implementing and integrating structured data to enhance your SEO efforts.
- Performance Optimization: Ensuring that your Magento store runs efficiently and provides a seamless user experience.
- Ongoing Support and Maintenance: Offering support to keep your Magento store up-to-date and running smoothly.
For more information or inquiries, please visit Degriz Magento eCommerce Development.