- This topic has 24 replies, 2 voices, and was last updated 8 years, 4 months ago by Mahesh. 
- 
		AuthorPosts
- 
		
			
				
June 3, 2017 at 10:01 am #116672Evguenia Engelmann ParticipantThe language of the material on the main page (Hero Content and other) does not change. The site works in three languages. How do I do this? With the usual output of the material, all the articles are switched to the language selected by the user. Clean education pro June 3, 2017 at 10:34 am #116673Evguenia Engelmann ParticipantPlugin “Polilang”. June 4, 2017 at 12:48 pm #116713Mahesh Participant@paedagogisches-zentrum: For this, you’ll need to create a child theme. You can find more details on creating child theme HERE. Then in your child theme’s function.phpadd the following codes:if ( ! function_exists( 'clean_education_child_polylang_invalidcache' ) ) : /** * Template for Clearing Polylang Invalid Cache * */ function clean_education_child_polylang_invalidcache() { delete_transient( 'clean_education_promotion_headline' ); } // clean_education_child_polylang_invalidcache endif; add_action( 'after_setup_theme', 'clean_education_child_polylang_invalidcache' ); function clean_education_child_polylang() { if ( function_exists( 'pll_register_string' ) ) { $options = clean_education_get_theme_options(); $promotion_title = $options['promotion_headline_title']; $promotion_content = $options['promotion_headline_content']; $promotion_button_text_1 = $options['promotion_headline_button']; $promotion_button_text_2 = $options['promotion_headline_button_2']; pll_register_string( 'promotion_title', $promotion_title ); pll_register_string( 'promotion_content', $promotion_content ); pll_register_string( 'promotion_button_text_1', $promotion_button_text_1 ); pll_register_string( 'promotion_button_text_2', $promotion_button_text_2 ); } } add_action ( 'admin_init', 'clean_education_child_polylang' );Then use the plugin’s string translation. Regards, 
 MaheshJune 4, 2017 at 4:33 pm #116717Evguenia Engelmann ParticipantHello, Mahesh! Created a children’s theme, added a style.css file but do not understand which text to add to it? 
 And where to add the text that you wrote above?Thank you June 4, 2017 at 4:57 pm #116718Evguenia Engelmann ParticipantDieses code not work: /* 
 Theme Name: Clean Education Pro Child Theme
 Theme URI: https://catchthemes.com/themes/catchbox-pro
 Author: Catch Themes Team
 Author URI: https://catchthemes.com
 Description: Catch Box Pro is an advance version of our popular theme Catch Box. It is based on HTML5, CSS3 and Responsive Web Design to view in various devices. Some of the additional features includes: featured image slider, option for full width slider, disable responsive layout, header option for margins, image and search, color options, additional color scheme, font family options, font size options, additional default layout options, additional optional sidebar for homepage, archive, pages, and posts, homepage category setting, more tag text options, and footer editor options. Multilingual Ready (WPML) and also currently translated in Brazilian Portuguese, Spanish, Danish, Germany, French, Polish, Czech, Croatian, Italian, Swedish, Russian, Arabic, Serbian, Dutch, Persian, Hungarian, Slovak and Japanese.
 Version: 2.1.3
 License: GNU General Public License, version 3 (GPLv3)
 License URI: https://www.gnu.org/licenses/gpl-3.0.txt
 Tags: one-column, two-columns, left-sidebar, right-sidebar, grid-layout, custom-background, custom-colors, custom-header, custom-menu, editor-style, featured-image-header, featured-images, flexible-header, front-page-post-form, post-formats, sticky-post, theme-options, threaded-comments, translation-ready, footer-widgets, blog, education, news, portfolio
 Text Domain: clean-education
 Template: clean-education-pro
 *//* =Child Theme Custom CSS if ( ! function_exists( ‘clean_education_child_polylang_invalidcache’ ) ) : 
 /**
 * Template for Clearing Polylang Invalid Cache
 *
 */
 function clean_education_child_polylang_invalidcache() {
 delete_transient( ‘clean_education_promotion_headline’ );
 } // clean_education_child_polylang_invalidcache
 endif;
 add_action( ‘after_setup_theme’, ‘clean_education_child_polylang_invalidcache’ );function clean_education_child_polylang() { 
 if ( function_exists( ‘pll_register_string’ ) ) {
 $options = clean_education_get_theme_options();$promotion_title = $options[‘promotion_headline_title’]; 
 $promotion_content = $options[‘promotion_headline_content’];
 $promotion_button_text_1 = $options[‘promotion_headline_button’];
 $promotion_button_text_2 = $options[‘promotion_headline_button_2’];pll_register_string( ‘promotion_title’, $promotion_title ); 
 pll_register_string( ‘promotion_content’, $promotion_content );
 pll_register_string( ‘promotion_button_text_1’, $promotion_button_text_1 );
 pll_register_string( ‘promotion_button_text_2’, $promotion_button_text_2 );
 }
 }
 add_action ( ‘admin_init’, ‘clean_education_child_polylang’ );June 4, 2017 at 5:05 pm #116719June 5, 2017 at 3:25 am #116739Mahesh Participant@paedagogisches-zentrum: You have an issue in your child theme. The style.cssis not loading properly. The code should be copied into child theme’sfunctions.phpnot instyle.css.
 Let me know further.Regards, 
 MaheshJune 6, 2017 at 10:08 am #116826Evguenia Engelmann ParticipantNew problem if ( ! function_exists( ‘clean_education_child_polylang_invalidcache’ ) ) : /** * Template for Clearing Polylang Invalid Cache * */ function clean_education_child_polylang_invalidcache() { delete_transient( ‘clean_education_promotion_headline’ ); } // clean_education_child_polylang_invalidcache endif; add_action( ‘after_setup_theme’, ‘clean_education_child_polylang_invalidcache’ ); function clean_education_child_polylang() { if ( function_exists( ‘pll_register_string’ ) ) { $options = clean_education_get_theme_options(); $promotion_title = $options[‘promotion_headline_title’]; $promotion_content = $options[‘promotion_headline_content’]; $promotion_button_text_1 = $options[‘promotion_headline_button’]; $promotion_button_text_2 = $options[‘promotion_headline_button_2’]; pll_register_string( ‘promotion_title’, $promotion_title ); pll_register_string( ‘promotion_content’, $promotion_content ); pll_register_string( ‘promotion_button_text_1’, $promotion_button_text_1 ); pll_register_string( ‘promotion_button_text_2’, $promotion_button_text_2 ); } } add_action ( ‘admin_init’, ‘clean_education_child_polylang’ ); June 6, 2017 at 10:26 am #116832Evguenia Engelmann ParticipantPlease write the full text of what I should specify in these two files? functions.php and style.css What is clearly not enough. June 7, 2017 at 1:34 am #116887Mahesh Participant@paedagogisches-zentrum: You can find the detail on how to create a child theme in the link below: 
 https://catchthemes.com/blog/create-child-theme-wordpress/You must be very careful when creating the child theme. Any minor error in functions.phpmay break your website.Regards, 
 MaheshJune 7, 2017 at 5:09 am #116907Evguenia Engelmann ParticipantI inserted only your code into file functions.php. Nothing works. Rereading all the options from the instruction, nothing changes. Means either an error in your code or it’s not complete. Please write the full file code functions.php June 7, 2017 at 5:10 am #116908Evguenia Engelmann ParticipantAnd my children’s theme is not there to download here “Sample Child Thymes”. June 7, 2017 at 5:12 am #116909Evguenia Engelmann ParticipantYou make me regret buying your template and it’s sad! I inserted your code, it does not work and what do I do now? I’m not a programmer like you. June 7, 2017 at 6:46 am #116919Mahesh Participant@paedagogisches-zentrum: Sorry, you’ll need to do one more function in your child theme’s functions.php.function clean_education_custom_promotion_headline( $options ) { $output = ''; $title = $options['promotion_headline_title']; $content = $options['promotion_headline_content']; $button_text_1 = $options['promotion_headline_button']; $button_link_1 = $options['promotion_headline_url']; $button_target_1 = $options['promotion_headline_target_1']; $button_text_2 = $options['promotion_headline_button_2']; $button_link_2 = $options['promotion_headline_url_2']; $button_target_2 = $options['promotion_headline_target_2']; $button_one = ''; $button_two = ''; //Checking Button 1 Elements if ( $button_text_1 ) { if ( $button_link_1 ) { //support qTranslate plugin if ( function_exists( 'qtrans_convertURL' ) ) { $button_link_1 = qtrans_convertURL( $button_link_1 ); } } else { $button_link_1 = '#'; } if ( $button_target_1 ) { $button_target_1 = '_blank'; } else{ $button_target_1 = '_self'; } $button_one = '<span class="readmore button-one"><a href="' . $button_link_1 . '" target="' . $button_target_1 . '">' . pll__( esc_html( $button_text_1 ) ) . '</a></span>'; } //Checking Button 2 Elements if ( $button_text_2 ) { if ( $button_link_2 ) { //support qTranslate plugin if ( function_exists( 'qtrans_convertURL' ) ) { $button_link_2 = qtrans_convertURL( $button_link_2 ); } } else { $button_link_2 = '#'; } if ( $button_target_2 ) { $button_target_2 = '_blank'; } else{ $button_target_2 = '_self'; } $button_two = '<span class="readmore button-two"><a href="' . $button_link_2 . '" target="' . $button_target_2 . '">' . pll__( esc_html( $button_text_2 ) ) . '</a></span>'; } if ( $title ) { $title = '<h2 class="section-title">' . pll__( $title ) . '</h2>'; } if ( $content ) { $content = '<p>' . pll__( $content ); if ( '' != $button_one || '' != $button_two ) { $content .= '<span class="promotion-buttons">' . $button_one . $button_two . '</span>'; } $content .= '</p>'; } $output .= $title . $content; return $output; }Since you are not familiar with programming, here is a working child theme for you. 
 http://bit.ly/2mv8jYC
 If you already have child theme, please delete it and add above one. Then go to Dashboard=> Languages=> String Translations and add string in your desired language.Note: 
 * This will make promotion headline translatable.
 * Don’t forget to put custom promotion headline in Customizer.Let me know if any problem. If you are having much trouble working with the code, I recommend you to hire a customizer. Regards, 
 MaheshJune 7, 2017 at 12:28 pm #116957Evguenia Engelmann ParticipantThanks for the answer. Added your files and the errors are gone. On this good ends. The language of the pages has not been updated and is not updated. For example, “Hero content” displays one page, and it is in three languages. On the site everything works fine, and the language update does not work in your modules. Output on the main page two identical pages for you, namely “About Us.” Try changing the language and see that everything works except for your module (options). June 7, 2017 at 12:31 pm #116958Evguenia Engelmann ParticipantYour template is multilanguage, why does not it display the selected language? But your deduction of the static countryman works and on it the language changes when you select another language. What confirms the problem in the template, and for this I need to hire a programmer is already your responsibility to correct mistakes. June 8, 2017 at 11:00 am #117112Evguenia Engelmann ParticipantUpdated the template to version 2.1.4. The language does not change. June 8, 2017 at 5:11 pm #117133Evguenia Engelmann ParticipantI do not understand! I paid for a non-working template ?! 
 Why do not I get paid for by tech support for two days already ?!If you do not fix the problem in your template then return me my money back please! June 9, 2017 at 2:37 am #117169Mahesh Participant@paedagogisches-zentrum: Sorry, our team is working on this issue and the issue has been marked as top priority. This issue will be fixed in the next update. Thank you for your patience. Regards, 
 MaheshJune 9, 2017 at 11:02 am #117206Evguenia Engelmann ParticipantThank God! Please tell me how long to wait for the update? And then we can not finish the site because of this problem. 
- 
		AuthorPosts
- The topic ‘The language of the material on the main page (Hero Content and other) does not’ is closed to new replies.
