Viewing 20 posts - 1 through 20 (of 25 total)
  • Author
    Posts
  • #116672
    Evguenia Engelmann
    Participant

    The 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

    https://sprachschule-pforzheim.de/

    #116673
    Evguenia Engelmann
    Participant

    Plugin “Polilang”.

    #116713
    Mahesh
    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.php add 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,
    Mahesh

    #116717
    Evguenia Engelmann
    Participant

    Hello, 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

    #116718
    Evguenia Engelmann
    Participant

    Dieses 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’ );

    #116719
    Evguenia Engelmann
    Participant
    #116739
    Mahesh
    Participant

    @paedagogisches-zentrum: You have an issue in your child theme. The style.css is not loading properly. The code should be copied into child theme’s functions.php not in style.css.
    Let me know further.

    Regards,
    Mahesh

    #116826
    Evguenia Engelmann
    Participant

    New 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’ );

    #116832
    Evguenia Engelmann
    Participant

    Please write the full text of what I should specify in these two files? functions.php and style.css

    What is clearly not enough.

    #116887
    Mahesh
    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.php may break your website.

    Regards,
    Mahesh

    #116907
    Evguenia Engelmann
    Participant

    I 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

    #116908
    Evguenia Engelmann
    Participant

    And my children’s theme is not there to download here “Sample Child Thymes”.

    #116909
    Evguenia Engelmann
    Participant

    You 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.

    #116919
    Mahesh
    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,
    Mahesh

    #116957
    Evguenia Engelmann
    Participant

    Thanks 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).

    #116958
    Evguenia Engelmann
    Participant

    Your 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.

    #117112
    Evguenia Engelmann
    Participant

    Updated the template to version 2.1.4. The language does not change.

    #117133
    Evguenia Engelmann
    Participant

    I 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!

    #117169
    Mahesh
    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,
    Mahesh

    #117206
    Evguenia Engelmann
    Participant

    Thank God! Please tell me how long to wait for the update? And then we can not finish the site because of this problem.

Viewing 20 posts - 1 through 20 (of 25 total)
  • The topic ‘The language of the material on the main page (Hero Content and other) does not’ is closed to new replies.