Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
614 views
in Plugins by
I have tried:

        function main_parts($content)
        {
            // check if user profile template and if not clicked on edit
            if($this->template=='user' && !qa_clicked('doaccount'))
            {
                $content['title'] = 'Other username';
            {

And it does not change the name. I guess it has been set earlier...
Q2A version: 1.7.4

1 Answer

0 votes
by
Seeing it myself...

Of course it is already set in $this->page_title_error();

See public function main() in qa-theme-base.php

-- -- --

Then you change by:

    function page_title_error() {
        // change h1 which is the username
        if($this->template=='user' && !qa_clicked('doaccount'))
        {
            $this->content['title'] = "test";
        }
        // default call
        qa_html_theme_base::page_title_error();
    }
...