- This topic has 16 replies, 5 voices, and was last updated 7 years, 8 months ago by Sakin.
-
AuthorPosts
-
December 13, 2015 at 1:51 am #81054SteveParticipant
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!
December 13, 2015 at 8:46 am #81079PratikParticipantHi @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,
PratikDecember 13, 2015 at 11:44 am #81084SakinKeymaster@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.
December 13, 2015 at 12:31 pm #81088SteveParticipantOK 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?
December 13, 2015 at 12:51 pm #81089SakinKeymaster@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
December 13, 2015 at 1:24 pm #81092SteveParticipantHmmm, 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?
December 13, 2015 at 2:11 pm #81094SakinKeymaster@Steve: This is strange. Meybe there is some conflict issue. Can you disable plugins and then try to change it.
December 13, 2015 at 3:14 pm #81096SteveParticipantIt 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 🙁
December 14, 2015 at 10:15 am #81123June 12, 2016 at 6:13 pm #93383kayaeParticipanti’m having the same struggle like Steve.. i wonder if you guys already found out any solution?
(i’m using adventurous theme + qtranslateX plugin)
June 12, 2016 at 9:13 pm #93388SakinKeymaster@kayae: Sorry adventurous free theme doesn’t support qtranslateX plugin fully. For that you need to upgrade to Adventurous Pro theme.
April 3, 2017 at 4:12 am #113366AncaParticipantHello,
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,
AncaApril 3, 2017 at 12:57 pm #113398SakinKeymaster@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' );
April 5, 2017 at 2:40 pm #113537AncaParticipantHi 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' );
April 6, 2017 at 12:32 pm #113614SakinKeymaster@ancageorgescugmail-com: Please copy the code properly. the code you have paste here is different then the one that I gave you.
April 13, 2017 at 6:31 am #113930AncaParticipantHello 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,
AncaApril 14, 2017 at 7:50 am #113948SakinKeymasterHello 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 andwpml-config.xml
.Regards,
Sakin -
AuthorPosts
- The topic ‘Changing Language in Promotional Headline + Featured Content’ is closed to new replies.