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

I'm designing a theme so want to know how to change meta_order by theme.

closed with the note: Get the right answer
by
–2
Your question amazes me because you can always search qa-theme-base.php for the keyword "meta_order".

1 Answer

+3 votes
by
selected by
 
Best answer

The value for meta_order in qa-lang/qa-lang-main.php just specifies the default order. The implementation of which elements appear in which order is actually in the method post_meta() in qa-include/qa-theme-base.php. You can change it by overriding the method in your theme (in qa-theme.php to be precise).

Add something like this to your theme:

class qa_html_theme extends qa_html_theme_base {
    ...
    function post_meta($post, $class, $prefix = null, $separator = '<br/>') {
        ...
        $order = Array('
where', 'who', 'when', 'what');
        foreach ($order as $element) {
            ...
        }
        ...
    }

    ...
}

Changing core files is not recommended, as the changes will be lost when updating Q2A.

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.

Categories

...