Amirhossein Hosseinpouramirhp
CV
Active WordPress plugin · Elementor

Q&A Comments

A question and answer section your experts actually answer.

An Elementor widget that turns the comments WordPress already has into a moderated Q&A section. Visitors ask, nothing appears until someone approves it, and an answer from the expert looks different from an answer from the support desk. No forum plugin, no external service, and every colour, font, spacing and word is editable in the panel.

How answers are told apart See the panel

A Pigment Dev product, installed and configured as part of the sites the studio builds, and available on its own. I co-founded Pigment Dev and lead its development.

Since version 1.0.02026 to today
clinic page · English · left to right · Gregorian

Your questions

12 published

Maryam23 May 2026

Is the follow up visit necessary if everything looks normal after two weeks?

Professor K.Specialist Expert answer

Yes, keep it. Two weeks is early for the result we are checking, and the visit takes only a few minutes.

Support teamClinic deskSupport

We have sent you the available times by email. Reply to that message to pick one.

Your name

M

Please write your full name, at least two characters.

Your question

Type your question here

Send the question1,432 / 1,500

Every question waits for approval. Links inside a question are never clickable.

What is in that section

  • The expert's answer carries a tick and a tinted card. Support answers carry no tick.
  • One message per mistake, under the field it belongs to
  • A live counter that turns amber near the limit and red past it
  • Every question waits for approval, and links in it are never clickable

// why

Why we built it

A site with an expert behind it gets asked questions. WordPress had two answers for that, and both were wrong.

Option one

The comment section as it ships

Anyone can post, the newest thing sits at the bottom, and there is no way to tell that the person answering is the specialist the visitor came for. It reads like a comment thread, because it is one.

Option two

A forum or a Q&A plugin

A second user system, a second set of templates that never match the theme, its own tables, and a chunk of load on a page that needed one section, not a community.

The details were where it really fell apart. A question with a link in it, published unreviewed, is a spam delivery system. A captcha sends visitor data to a third party for what is, in the end, a name and a sentence. The date reads in a calendar half the audience does not use. And when the client wanted one word of the form changed, the answer was a code snippet.

The realisation

The data model was already right. Everything missing was presentation, moderation and language.

Native comments already give you threading, moderation, notification, spam hooks and an export. What they do not give you is a section that looks like a Q&A, an answer that visibly comes from the expert, and a form a client can rewrite without a developer. Those were the parts worth building.

So one Elementor widget renders a post's comments as a Q&A section. The form submits without reloading and falls back to a plain round trip when JavaScript is off, with the values restored and no white error page. Spam is stopped on the site itself, with nothing sent to an outside service. Every visitor-facing string can be translated and then overridden per widget, dates are Jalali with Persian digits or Gregorian by page language, and the whole appearance, sixteen groups of it, lives in the Elementor Style tab.

// two-layers

Two kinds of answer, told apart at a glance

The question a visitor really has is whether the answer came from the expert. The section answers that before they read a word.

The expert layer

  • Accounts you pick in the settings, not a role and not a guess
  • A badge with a tick, in the wording you choose
  • A tinted card, so the answer stands out inside the thread
  • Their own portrait, uploaded once in the settings
  • Name and title under the answer, translatable per language

The support layer

  • Everyone else who can moderate comments, automatically
  • A badge without a tick, so nobody mistakes it for the expert
  • A shared team name and logo instead of individual staff accounts
  • The same styling controls as the expert layer, set separately

Reply as, per answer

  • A choice on the quick reply row in the comments screen: automatic, expert or support
  • A column in the comments list showing how each answer will appear
  • Support drafts, and the expert publishes it under their own name when they approve it
  • Changing it fires an event, so the change can be notified like any other

Visitors stay visitors

A question never carries a badge, and the visitor avatar is your choice: nothing at all, the first letter of the name, or Gravatar.

Threading stays shallow

Two levels: the question and its answers. No nested arguments, no pagination surprises, no thread that walks off the edge of the screen.

The asker gets told

When an answer is published, the person who asked receives an email in the language they asked in, if they left an address.

// the-form

A form that explains itself

Name, question, an optional email and a remember me box. No website field, because that field exists for spam. Everything else is about what happens when something goes wrong.

Sends without reloading

A token is fetched, the question is posted, and the answer comes back in place. The page keeps its scroll position and a slow network never costs the visitor what they typed.

One message per mistake

Sixteen validation cases, each with its own sentence under the field it belongs to, a banner counting what needs fixing, and focus moved to the first problem.

Works without JavaScript

The plain form posts, and the page comes back to the section with the banner and the typed values restored. Never the white WordPress error page.

Counter before the limit

A live count that turns amber near the ceiling and red past it, with the send button disabled rather than the question silently truncated.

Stale pages recover

A tab left open for hours gets a clear notice instead of a silent failure, and the text stays in the browser so nothing is retyped.

Closed, but not broken

When questions are closed on a page, the form becomes a calm notice with a link to your contact page, and the existing questions and answers stay where they were.

Show more, not a second page

A set number of questions is shown and the rest arrive behind one button, with focus on the first new card so a keyboard user is not sent back to the top.

// anti-spam

Anti-spam without a third party

A name and a sentence do not justify shipping your visitors to someone else's servers. Everything here runs on your site.

A honeypot
A field a human never sees and a bot always fills.
A time trap
Anything sent within a few seconds of the page loading is not a person.
A rate limit per address
A few submissions in a short window, then a countdown on the button.
Duplicate detection
The same question sent twice gets a notice, not a second card.
Bots are told it worked
A trapped submission sees the success message, because telling a bot it failed only teaches it.
Moderation is forced
Nothing is published unreviewed. The plugin enforces it; it is not a setting someone can switch off later.
Links stay text
Links in a question are never clickable, so a published question cannot be a backlink.
Nothing leaves the server
No captcha, no external request, and no visitor data sent anywhere.
The discussion checklist

Fourteen WordPress discussion settings that this section depends on are applied on activation, then audited on the settings page and inside the widget panel, with a tick or a warning for each. One button sets them all again if a later change knocks one out of line, and the previous values are kept so you can see what was changed and why.

// languages

Any number of languages, three layers deep

Every word a visitor sees comes from one of three places, and the more specific one wins. A translator, a site owner and a page designer can all change text without overwriting each other.

  1. The plugin's own language files

    English in the code, Persian bundled. Follows the language of the page automatically.

  2. WPML string translation

    Every visitor-facing string registered under one context. A third language is translated once and applies everywhere.

  3. The widget panel

    Text typed into one widget wins over both, for that widget only.

Dates and links follow the page too: Jalali with Persian digits or Gregorian by page language, and the contact link resolved per language.

A texts and languages tab

One card per text, each language side by side, with a live filter. Type email and only the email texts stay on screen.

Right to left, not an afterthought

Logical properties throughout, so the section mirrors correctly rather than being patched with direction-specific overrides.

The dashboard too

The settings page and the widget panel are bilingual themselves and follow each administrator's own dashboard language.

// the-panel

Everything is in the panel

The rule this plugin was built on: if a client can describe the change, they should be able to make it without a developer and without CSS.

Content tab

What the section shows, and every word it says.

  • Source: this page's questions, or those of a page you name
  • An anchor id and an offset for a sticky header, so deep links land correctly
  • Header, order, how many before show more, hide unanswered, dates, badges, avatars
  • Every label, help line, placeholder, message and banner, for this widget only

Style tab

Sixteen groups, each with typography, colour, spacing, border, radius and shadow. No CSS.

  • Eight colour tokens: accent, text, lines, cards, the expert tint and the focus ring
  • Defaults read from the theme's global colours, so it matches before you touch anything
  • Question cards, expert answers and support answers, each styled on their own
  • Inputs in normal, focus and error states; buttons in normal, hover and disabled

Settings page

Eight tabs, for the things that belong to the site rather than to one widget. Docs explains every setting with developer samples; Changelog lists every version with its date.

ChecklistExpertSupportBehaviourTexts and languagesTelegramDocsChangelog

// telegram

Every question in Telegram, seconds after it is asked

Six moments in the life of a question, each able to send its own message to a group, a channel or a private chat, written by you with macros.

It uses the bot already set up in Toolkit

The events

  1. A question was submitted
  2. A question was approved
  3. The expert answered
  4. Support answered
  5. An answer changed layer
  6. An answer was edited

Your message, your macros

Written by you with formatting, with two buttons underneath: view on the site, open in the dashboard. A test send before you save anything.

Receivers per event

Questions and answers can go to different chats. Every event is off until someone switches it on deliberately.

Sent after the page has finished

So a slow Telegram never slows a visitor down.

One bot, set up once

Through the bot the site already has in Toolkit, with filters on the message, the receivers and the buttons for anything unusual.

The question

{question_text}{question_excerpt}{question_link}{question_status}{admin_link}

The asker

{asker_name}{asker_email}{asker_ip}{asker_country}{asker_browser}{asker_os}{asker_device}

The answer, page and site

{answer_text}{answer_author}{answer_kind}{answer_link}{page_title}{page_url}{site_name}{date}{jalali_date}

The macro list is generated inside the plugin, with a searchable picker beside the message editor, and your own macros can be added through a filter.

// developers

For developers

An event for every moment, a filter at every seam, and a module tree that can be lifted into another plugin.

functions.php · pgqa hooks
// Do something when the expert answers
add_action( 'pgqa/event/answer_pro', function ( array $ctx ) {
  $link = $ctx[ 'macros' ][ '{answer_link}' ];
  // notify a CRM, log it, post it somewhere else
} );

// Or listen to everything
add_action( 'pgqa/event', function ( string $event, array $ctx ) {
  // $event: question_submitted, answer_pro, answer_edited ...
}, 10, 2 );

// Add your own macro to every message
add_filter( 'pgqa/macros', function ( array $macros, array $ctx ) {
  $macros[ '{clinic_branch}' ] = get_post_meta( $ctx[ 'post' ]->ID, 'branch', true );
  return $macros;
}, 10, 2 );
pgqa/eventpgqa/event/{event}pgqa/event/should_firepgqa/macrospgqa/geo_countrypgqa/telegram/messagepgqa/telegram/recipientspgqa/telegram/keyboardpgqa/telegram/sent

Hook into it

One action per event and one catch-all, both carrying the comment, the post and the resolved macros. Decide whether an event fires at all, per event and per context.

Send anywhere

The event bus means email, SMS or any other service is a listener, not a fork.

Structured data and a shortcode

The questions and answers are marked up so search engines read the section as a Q&A, and a shortcode renders the same section outside Elementor.

A host-agnostic module tree

The same code ships standalone or inside our toolkit, with the settings store injected.

Every hook is documented with a copy and paste sample inside the plugin, under Settings, Docs.

// tested

Measured, not eyeballed

Before a release goes to a site, the section is driven by a headless browser on a real page and the result is measured. A sample of what gets checked every time.

CheckWhat is measuredResult
The section rendersColumn width, title and body sizes, line height, avatar size and answer indent, on desktop and mobilePass
Language follows the pageTitle, badges and the date format switch with the page language, in both directionsPass
Empty and short fieldsThe right message under the right field, a banner counting them, focus on the first onePass
A question over the limitCounter turns red, the button disables, nothing is silently truncatedPass
A real submissionThe question lands in the moderation queue and the visitor is told they will hear backPass
The same question twiceA notice that it has already been received, rather than a duplicate cardPass
Four submissions in a rowThe rate limit message and a countdown on the buttonPass
The network drops mid sendAn error banner, the typed question kept, the button usable againPass
A page left open for hoursA clear notice about the stale page, with the text preserved in the browserPass
Honeypot or time trap trippedDiscarded silently, and the bot is shown the success messagePass
JavaScript switched offErrors and success both return to the section with a banner and restored values, no white pagePass
Show moreThe hidden cards appear and focus moves to the first new onePass
Answering from the dashboardAn answer published as the expert carries the expert badge on the front endPass
The rest of the siteHome, blog and contact still return normally after installPass
Escaped and sanitised throughout Every file linted before release Client test pages always noindex

Works with

Elementor
3.x and 4.x, in its own widget category.
Native comments
No extra tables, no second user system.
WPML
String translation, any number of languages.
Rank Math
Question and answer structured data.
Woodmart and other heavy themes
Overrides by specificity, never by force.
Page caching
The time stamp is set in the browser, not baked into the page.
Toolkit
Shares its Telegram bot and coexists cleanly.
A shortcode
For themes and builders other than Elementor.
The Jalali calendar
With Persian digits.
Gravatar
Optional, for visitors only, if you want it.
Your plugin
Through events, macros and filters.
Any post type
Posts, pages and custom types alike.

// questions

Questions

Q&A Comments is installed and configured as part of the sites Pigment Dev builds, and is available on its own: the section you need, the languages it has to speak, and who should be answering.

Ask about a setup

Does it create its own tables or its own user system?

No. Questions and answers are ordinary WordPress comments, so moderation, notifications, export and every tool you already use keep working. Uninstalling the plugin leaves the content exactly where it was.

Do I need Elementor?

The widget needs Elementor, and it is how you get the full content and style panels. There is also a shortcode for the same section, for pages and themes built another way.

Is there a captcha?

There is no captcha and no external service. A honeypot, a time trap, a per-address rate limit, duplicate detection and forced moderation do the work, and nothing about your visitors is sent anywhere.

How many languages can the section carry?

As many as the site has. English and Persian ship with the plugin, and every visitor-facing string is registered for translation under one context, so a third or fourth language is translated once and applies everywhere. A single word can still be overridden inside one widget.

Will it fight with my theme's comment styling?

It is built to win on specificity rather than force, with no !important anywhere, and it uses logical properties so a right-to-left site mirrors correctly. Defaults are read from your theme's global colours, so it matches before you change a thing.

Does the Telegram part need its own bot?

It uses the bot your site already has configured in Toolkit, so there is nothing to create twice. Notifications stay off until you switch on the events you care about.

branch main 6 active projects ↑ 113 releases products/qa-comments.md Sari --:-- UTC+3:30 its@amirhp.com