WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] qtranslate - Category Description (7 posts)

  1. Shanaki
    Member
    Posted 2 years ago #

    Hello,

    I have a problem with qtranslate. I cannot translate the Category Description.

    Post>Categories> only Category Name can be translated.

    Any solved situation to this issue?

  2. Shanaki
    Member
    Posted 2 years ago #

    Sloved.

    I will explain with details for everybody, cause i hate to don`t find information.

    Requirements:
    -Rich Category Editor (is a plugin, who is possible to give you an error but you can ignore it, it work.)
    -Qtranslate

    Steep 1:
    You look for a file (in your theme), named: functions.php.
    Inside this file, you insert at last line before "?>" (end of php):

    require_once ( ABSPATH . 'wp-admin/includes/plugin.php' );
    $lookforqt = 'qtranslate/qtranslate.php';
    $category_description = category_description();
         if ( ! empty( $category_description ) ) {
    
        if (is_plugin_active( $lookforqt )) { 
    
                 _e( '<div class="category-archive-meta-multilingual">' . $category_description, 'qtranslate' . '</div>' );
                  } else { 
    
                 echo apply_filters( 'category_archive_meta', '<div class="category-archive-meta">' . $category_description . '</div>' );
              }
        }

    Steep 2:
    You go now inside wp-admin. And click on POST > Category > and you will see you can add text at title in many language but not at description.
    But if you installed the editor now you can click HTML(code)and enter next code:
    <!--:en--> English Version <!--:--><!--:ro--> Romanian Version <!--:-->

    And it work 100%.

    And by the way thank you for 0 reply!

  3. phantasmix
    Member
    Posted 1 year ago #

    Hi there,
    thanks for this, works great!

    Rich Category Editor is not really necessary. That code with <!--:en--> worked in the regular category description field.

  4. Shanaki
    Member
    Posted 1 year ago #

    Hello, nice to see i help someone, anyway now the plugin has been updated, and Steep 2 work without the Steep 1.

    I think. Anyway if not u have the solution.

  5. phantasmix
    Member
    Posted 1 year ago #

    Ah, yes, hadn't tried that at firist, but it works without modifying the function file, too. Thanks again!

  6. agustin866
    Member
    Posted 1 year ago #

    Hi guya, so I can have a multilingual category description for SEO purposes in WP with qtranslae if I understood right?

    I only must use this format:
    !--:en--> English Version <!--:--><!--:ro--> Romanian Version <!--:-->

    In category description?
    And with no need of extra plugins?

    Is that right?
    Thanks to both of you

  7. paquito
    Member
    Posted 1 year ago #

    Hi Shanaki, can you give us the code to do exactly the same but also for the PORTFOLIO CATEGORIES?

    Thanks a lot!
    Paolo

Topic Closed

This topic has been closed to new replies.

About this Topic