3.3 KiB
3.3 KiB
FAQ Manager Plugin
A comprehensive WordPress plugin that allows administrators to easily create and manage FAQ pages with drag-and-drop reordering functionality.
Features
- Easy FAQ Management: Add, edit, and delete FAQs from a user-friendly admin interface
- Drag-and-Drop Reordering: Intuitive FAQ ordering with visual feedback
- Automatic Page Creation: Automatically creates an FAQ page upon plugin activation
- Responsive Design: Mobile-friendly frontend FAQ display with modern styling
- Accessibility: WCAG 2.1 AA compliant with keyboard navigation and screen reader support
- Dark Mode Support: Automatic styling for dark mode preferences
- Clean Uninstallation: Complete data removal when plugin is uninstalled
Installation
- Upload the
pc-faq-manager-abc123folder to your WordPress plugins directory - Activate the plugin through the "Plugins" menu in WordPress
- Access "FAQ Manager" from your WordPress admin menu to start adding FAQs
- The FAQ page will be automatically created at
/faq/
Usage
For Administrators
- Adding FAQs: Navigate to FAQ Manager → Add New FAQ, enter your question and answer, and click "Create FAQ"
- Editing FAQs: From the main FAQ Manager page, click "Edit" on any FAQ to modify it inline
- Reordering FAQs: Drag and drop FAQs to reorder them, then click "Save Order"
- Deleting FAQs: Click "Delete" on any FAQ to remove it permanently
For Website Visitors
- Visit
/faq/on your website to view all FAQs - Click on any question to expand/collapse the answer
- Use keyboard navigation (arrow keys) to browse FAQs
- Print-friendly format is available
Files Structure
pc-faq-manager-abc123/
├── pc-faq-manager-abc123.php # Main plugin file
├── uninstall.php # Cleanup on uninstall
├── includes/
│ ├── class-pc-faq-manager-helper.php
│ └── class-pc-faq-manager-post-type.php
├── admin/
│ ├── class-pc-faq-manager-admin.php
│ ├── css/admin-style.css
│ ├── js/admin-script.js
│ └── templates/
│ ├── main-page.php
│ └── add-page.php
├── public/
│ ├── class-pc-faq-manager-public.php
│ ├── css/public-style.css
│ └── js/public-script.js
└── assets/ # For future media files
Security Features
- Nonce verification for all AJAX requests
- Capability checks to ensure only authorized users can manage FAQs
- Input sanitization and output escaping
- SQL query protection using WordPress $wpdb prepare
- XSS prevention with proper data filtering
Compatibility
- WordPress 5.0+
- PHP 7.4+
- Tested with popular themes and plugins
- Compatible with WordPress block editor (Gutenberg)
Customization
Styling
The plugin uses CSS custom properties that can be overridden in your theme:
:root {
--pc-faq-primary-color: #your-color;
--pc-faq-secondary-color: #your-bg-color;
/* ... other variables */
}
Shortcode
Use the [pc_faq_page] shortcode in any page or post to display FAQs:
[pc_faq_page title="Custom Title" show_count="false"]
Support
For support and feature requests, please visit: https://plugincompass.com/plugins/pc-faq-manager-abc123
License
This plugin is licensed under the GPLv2 or later license.