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

I am redesigning (structure) the user page and got stuck because the Favorite Form contains the H1 and the input field for the favorite action.

<form method="post" action="../user/kajus">
  <span class="qa-favoriting" id="favoriting">
    <input name="favorite_U_9_0" onclick="return qa_favorite_click(this);" value="" class="qa-favorite-button" type="submit">


<input name="code" value="securitycode" type="hidden">

This makes it very difficult to move the form or even moving the input field to another position does not work, since it is not in the form anymore.

My advice: Have the H1 standing alone (!) and the favorite form behind.

PS: And no, I cannot override function page_title_error() because I am using this function in many other plugins. And in this function we have:


Which causes the issue.


Update: Furthermore I cannot "touch" the *text* of h1 separately. The CSS always effects all elements within the H1.


I think it should be in qa-theme-base.php:


With an enclosing DIV around these elements.

Q2A version: 1.7.4
The ones who downvoted this post obviously never have done customization...
@Kai I think someone is testing Q2A and in that he is giving all of these downvotes. Maybe even one of them is @Knab who has done first comment on this question. See his profile, 40+ downvotes are there and he is only 6 hrs old user.
I thought it was spam.

1 Answer

+1 vote

A better solution would also make sure that the H1 is not within the form (also give the form a CSS class):

public function page_title_error()
    if (isset($this->content['title'])) {

        // q2apro changed order with favorite and put form down
        $favorite = isset($this->content['favorite']) ? $this->content['favorite'] : null;
        if (isset($favorite))
            $this->output('<form class="favoriteform" ' . $favorite['form_tags'] . '>');


        if (isset($favorite)) {
            $formhidden = isset($favorite['form_hidden']) ? $favorite['form_hidden'] : null;
    if (isset($this->content['error']))