The only template hook I’m aware of meant specifically for comments is ‘comment_form’. And of course that will only work when a theme has the hook (not all do).
I can imagine doing this programmatically by having your plugin conditionally test for single post or Page queries, then using output buffering to parse the page’s content, etc. Not a very workable solution in the best of conditions. So yeah, explaining how to add these fields to ones template is your option here.
(@nicosfr)
16 years, 2 months ago
Hi,
I’m writing a simple plugin to add various actions when a user posts a comment.
I have added custom fields below the comment form using the comment_form hook.
What I would like to do is to have those fields output before the comment submit button. Is it or do I have to hardcode my fields in the comment template ?