WordPress.org

Forums

Advanced Excerpt with qTranslate (4 posts)

  1. maciejewski
    Member
    Posted 2 years ago #

    Hi.
    I'm a complete noob to WordPress so please be patient.
    I'm implementing a bilingual site using qTranslate. It works fine, but search results are fetched the way I can't accept.
    The main language is polish, secondary is english.
    While the_loop, and the_excerpt are working fine, bringing me correct data -search function combined either with the_content or the_excerpt (advanced excerpt has been applied as well) is not.
    All I get is the beginning of the entry (unfortunately qTranslate concatenates bilingual posts into one entity and separates them with <!--lang=='en'> alike tags), so I,m allways getting the polish content in the search results, but what is really weird, when click on the permalink, the content is displayed in correct language.
    I'm just wondering how to make the_excerpt (or advanced excerpt) skipping the content in irrelevant language - is there a way to tune up mentioned functions?
    I'd rather not to use WPML plugin .

  2. bcworkz
    Member
    Posted 2 years ago #

    If the_excerpt is working correctly in your main content, but not in search results, there must be a difference in the templates. The same function is called from either template, yet what is displayed is different. You should investigate how it is working correctly in main content before you start hacking the_excerpt function. I think your search template is lacking in some way.

  3. ancawonka
    Member
    Posted 2 years ago #

    Yes, definitely look at the search template. I have a site using qTranslate and the search works in the "correct" language.

    Are you using some kind of plugin to help you w/the search?

  4. maciejewski
    Member
    Posted 2 years ago #

    Nope.
    Tried advanced search, but website consists of little amount of data, so default search meets my criteria.
    I'm trying to find differences between loop and search template.
    Fingers crossed :)

Topic Closed

This topic has been closed to new replies.

About this Topic