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

I took time trying to solve problems at seo . 

The platform is good, but is bad seo level .

Titles, descriptions are repeated for seo and this is a big problem.

Example

categorie : domain.com/art    title "art" descr "art bla bla bla"

                domain.com/art?start=20  title "art"  descr "art bla bla bla"

                domain.com/art?start=30  title "art"  descr "art bla bla bla"

This is bad for seo.

Correct :

 domain.com/art  title "art"  descr "art bla bla bla"

domain.com/art?start=20  title "art - Page 2"  descr "art bla bla bla. Page 2"                                 domain.com/art?start=20  title "art - Page 3"  descr "art bla bla bla. Page 3"

 

Someone knows how to solve this?

 

1 Answer

+4 votes
by

Yes I had the same issue. To solve it, I added the following in an advanced theme:

function head_title()
{
    if ( qa_get('start') && isset($this->content['title']) )
        $this->content['title'] = $this->content['title'] . ' (page ' . floor(qa_get('start') / $this->_get_per_page() + 1) . ')';

    parent::head_title();
}

// return how many items are on this page
private function _get_per_page()
{
    $arr = array('page_size_qs', 'page_size_tags', 'page_size_users', 'page_size_search');
    $options = qa_get_options($arr);

    switch ( $this->template )
    {
        case 'questions':
            return $options['page_size_qs'];
        case 'tags':
            return $options['page_size_tags'];
        case 'users':
            return $options['page_size_users'];
        case 'search':
            return $options['page_size_search'];
    }

    return 20;
}

Hope that helps!

By the way, this is certainly something I could add to the Q2A core if everyone thinks it's a good idea.

by
Surely Scott, do it for Q2A.
by
@Victor do you mean remove the query string (?var=value) or use page numbers (page=2 rather than start=20) ??

I think it makes sense to use the query string since it is a query.

In earlier Q2A we couldn't use page numbers due to the way all queries were fetched at once. That's changed now (options are fetched ahead of time) so we could probably do that.
by
What I want is to make the url friendly . So this I need :

domain.com/art/page-2 or domain.com/art/2

and that the canonical also changed.


My English is very bad , sorry .


I am a lover of seo really is what gives money. I have changed a lot in terms of structures but others as I do not take this problem solved.
by
@Scott, definitely it is a good idea and should be included in q2a core. IMO
...