Skip to content

Repository files navigation

Previous Next Questions Plugin for Question2Answer

Adds previous/next question navigation on question pages with per-user placement control, category-based navigation, and integration with the Lists plugin.

Features

  • Global navigation — Navigate to the previous/next question by post ID order
  • Category navigation — Navigate within the same category (optional)
  • List navigation — Navigate within user-created lists from the Lists plugin (optional, per-user)
  • Flexible placement — Admin sets the default; each user can override via a dropdown:
    • Widget area (managed via Admin > Layout)
    • After question content
    • After first answer
  • Question title preview — Buttons show the first 20 characters of the destination question title
  • Keyboard navigation — Optional left/right arrow key shortcuts
  • Responsive — Adapts to mobile screens

Requirements

  • Question2Answer 1.6+
  • Lists plugin (only required if list navigation is enabled)

Installation

  1. Copy the prev folder into your qa-plugin directory
  2. Go to Admin > Plugins and verify the plugin is listed
  3. Go to Admin > Previous Next Questions Settings to configure
  4. If using "Widget" placement, also add the widget via Admin > Layout

Configuration (Admin Panel)

Option Description Default
Default placement Where the nav appears (users can override per-browser) Widget
Show question title Display truncated title in nav buttons On
Keyboard navigation Enable ← → arrow key shortcuts Off
Enable for categories Show category-scoped prev/next On
Enable list navigation Show prev/next within user lists (requires Lists plugin) Off
Label options Customize text for all prev/next buttons Configurable

Per-User Placement

Each user can choose where the navigation appears using the "Show nav" dropdown rendered below the navigation buttons. The preference is stored in a browser cookie and does not require login. The admin setting serves as the default for new visitors.

File Structure

prev/
├── metadata.json              # Plugin metadata and version
├── qa-plugin.php              # Plugin registration
├── qa-prev-next-admin.php     # Admin settings page
├── qa-prev-next-functions.php # Shared rendering and query functions
├── qa-prev-next-layer.php     # Theme layer (CSS/JS injection, placement hooks)
├── qa-prev-next-widget.php    # Widget module (for widget placement mode)
├── styles.css                 # All styling
└── README.md

License

GPLv2

Author

Arjun Suresh

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages