Viewing 17 posts - 1 through 17 (of 17 total)
  • Author
    Posts
  • #81054
    Steve
    Participant

    It’s me again :))

    I’ve googled possible methods of doing this, however I’m concerned if I use their ….. methods of changing this I’ll end up making more damage than good.

    I have two languages with each page having the option of two, however obviously there’s some issues with doing this with the main page. I only want to be able to change the language for the promotional headline + featured contents section.

    It has been suggested to change some PHP or CSS codes, however with my complete lack of knowledge of such things I’m afraid of undoing all the ‘good work’ I’ve done.

    Any suggestions?

    Thanks do much!

    #81079
    Pratik
    Participant

    Hi @Steve,
    This is little advance question and I would like to leave this to be answered by Sakin. He is on travel for WordCamp US. So, you might get reply little late.

    Thanks,
    Pratik

    #81084
    Sakin
    Keymaster

    @Steve: For Multi-language support, we recommend you to upgrade to Adventurous Pro which is WPML and Polylang plugin compatible. So, you can translate all using WPML plugin.

    #81088
    Steve
    Participant

    OK Sakih, thanks for this. I’ll look into upgrading asap

    Is this WPML + Polylang plugin also connected to issues I’m having with languages constantly changing back from Slovene to German even though I continually change it to Slovene in the settings?

    #81089
    Sakin
    Keymaster

    @Steve: I don’t think so. Your default language should be set from your settings and then if you have Pro version and WPML then you can use string translation for Promotional Headline and Featured Content

    #81092
    Steve
    Participant

    Hmmm, OK. So I’ll upgrade to Pro to get the Promo stuff into two languages however I’m not sure about the default language. I changed it to Slovene in the setting with the correct language code etc. but it won’t allow me saying that my language code is already being used & in the end I have to used the German de.

    Any ideas?

    #81094
    Sakin
    Keymaster

    @Steve: This is strange. Meybe there is some conflict issue. Can you disable plugins and then try to change it.

    #81096
    Steve
    Participant

    It comes up with this:

    Option “Configuration Files” for plugin qTranslate‑X has been auto-adjusted after recent changes in the site configuration.

    And:

    There is already a language with the same Language Code!

    It doesn’t change if I disable plugins 🙁

    #81123
    Sakin
    Keymaster

    @Steve: Sorry I don’t get it what you mean.

    #93383
    kayae
    Participant

    i’m having the same struggle like Steve.. i wonder if you guys already found out any solution?

    (i’m using adventurous theme + qtranslateX plugin)

    #93388
    Sakin
    Keymaster

    @kayae: Sorry adventurous free theme doesn’t support qtranslateX plugin fully. For that you need to upgrade to Adventurous Pro theme.

    #113366
    Anca
    Participant

    Hello,
    I am using Adventurous Free Theme and installed Polylang. Is there any possibility to translate the Featured Content and Promotion Headlines areas on this free theme?

    I translated the entire website, but these two areas did not work.

    Thank you in advance,
    Anca

    #113398
    Sakin
    Keymaster

    @ancageorgescugmail-com: Sorry there is no easy way to do that except upgrading to pro version. To do this is free version, you need to know little technical details. First, you need to build child theme, for child theme refer to https://catchthemes.com/blog/create-child-theme-wordpress/ and then add the following code in your child theme functions.php file.

    if ( ! function_exists( 'adventurous_poly_invalidcache' ) ) :
    /**
     * Template for Clearing Polylang Invalid Cache
     */
    function adventurous_poly_invalidcache() {
    	delete_transient( 'adventurous_post_sliders' );
    	delete_transient( 'adventurous_page_sliders' );
    	delete_transient( 'adventurous_category_sliders' );
    	delete_transient( 'adventurous_image_sliders' );
    	delete_transient( 'adventurous_homepage_headline' );
    	delete_transient( 'adventurous_homepage_featured_content' );
    	delete_transient( 'adventurous_footer_content' );	
    	delete_transient( 'adventurous_footercode' );
    	delete_transient( 'adventurous_featured_image' );
    
    } // adventurous_wpml_invalidcache
    endif;
    
    add_action( 'after_setup_theme', 'adventurous_poly_invalidcache' );
    #113537
    Anca
    Participant

    Hi Sakin and thank you for your answer.
    I created the child theme with the plugin you suggested, activated and added your code in the functions.php file. After saving I got HTTP ERROR 500.
    The content of the file is currently below (now the code you gave me is put as comment). Where did I got wrong?

    <?php
    //
    // Recommended way to include parent theme styles.
    // (Please see http://codex.wordpress.org/Child_Themes#How_to_Create_a_Child_Theme)
    //
    add_action( ‘wp_enqueue_scripts’, ‘theme_enqueue_styles’ );
    function theme_enqueue_styles() {
    wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘/style.css’ );
    wp_enqueue_style( ‘child-style’,
    get_stylesheet_directory_uri() . ‘/style.css’,
    array(‘parent-style’)
    );
    }
    //
    // Your code goes below
    //
    //if ( ! function_exists( 'adventurous_poly_invalidcache' ) )

    /**
    * Template for Clearing Polylang Invalid Cache
    */
    /*
    function adventurous_poly_invalidcache() {
    delete_transient( 'adventurous_post_sliders' );
    delete_transient( 'adventurous_page_sliders' );
    delete_transient( 'adventurous_category_sliders' );
    delete_transient( 'adventurous_image_sliders' );
    delete_transient( 'adventurous_homepage_headline' );
    delete_transient( 'adventurous_homepage_featured_content' );
    delete_transient( 'adventurous_footer_content' );
    delete_transient( 'adventurous_footercode' );
    delete_transient( 'adventurous_featured_image' );

    } // adventurous_wpml_invalidcache
    */
    #endif;

    #add_action( 'after_setup_theme', 'adventurous_poly_invalidcache' );

    #113614
    Sakin
    Keymaster

    @ancageorgescugmail-com: Please copy the code properly. the code you have paste here is different then the one that I gave you.

    #113930
    Anca
    Participant

    Hello Sakin,

    I copied again the code and now it is working. My problem now is that I can not see where should I add the text for the second language. Now Feature content and Promotion Headline can not be modified in both languages.
    Now it is written only in Romanian. The website is http://asociatiadeenoturism.ro/

    Please pleas please advise.

    Thank you in advance,
    Anca

    #113948
    Sakin
    Keymaster

    Hello Anca,

    Sorry, for that you need to create wpml-config.xml file and use string translation as show in https://polylang.pro/doc/strings-translation/. So, I recommend you to upgrade to pro version where you don’t need to add these functions and wpml-config.xml.

    Regards,
    Sakin

Viewing 17 posts - 1 through 17 (of 17 total)
  • The topic ‘Changing Language in Promotional Headline + Featured Content’ is closed to new replies.