Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
in Q2A Core by


How can I override votes, I would like to increase vote numbers and also the microdata.

in format.php I can override microdata however I want to override this with plugin for future updates.

if ($microdata) {

$fields['netvotes_view']['suffix'] .= ' <meta itemprop="upvoteCount" content="' . qa_html($upvotes - $downvotes+5) . '"/>';

$fields['upvotes_view']['suffix'] .= ' <meta itemprop="upvoteCount" content="' . qa_html($upvotes+5) . '"/>';


The function you modified is overridable because it contains this line of code

if (qa_to_override(__FUNCTION__)) { $args=func_get_args(); return qa_call_override(__FUNCTION__, $args); }

So you will create an OVERRIDE plugin https://docs.question2answer.org/plugins/overrides/

And you simply copy the whole modified function in the override file.
edited by
Since your modification only changes the value of an array key. Try overriding public function vote_count($post) in your theme to see if it works.

Please log in or register to answer this question.

Welcome to the Q&A site for Question2Answer.

If you have a question about Q2A, please ask here, in English.

To report a bug, please create a new issue on Github or ask a question here with the bug tag.

If you just want to try Q2A, please use the demo site.