Tagged: polylang
- This topic has 8 replies, 2 voices, and was last updated 5 years, 6 months ago by Skandha.
-
AuthorPosts
-
February 11, 2019 at 8:52 am #165622angrybirdParticipant
Just bought Fullscreen Pro. Your webpage says “Glance over our Multilingual WordPress themes with built-in multilingual support. Supports plugin like WPML, Polylang and qTranslate.”
I’m using Polylang (WPML-compatibility enabled), but cannot figure out how to translate the Header Media Title or Header Media Text. It does not show up in the Textstring-translations, nor anywhere else.
What to do?
February 11, 2019 at 10:55 pm #165663SkandhaParticipant@ville123: Please post in your site URL so that I can look into the issue.
Kind Regards,
SkandhaFebruary 12, 2019 at 2:33 am #165683angrybirdParticipantFebruary 13, 2019 at 3:54 am #165755angrybirdParticipantAny ideas?
February 13, 2019 at 4:10 am #165758SkandhaParticipant@ville123: First of all you will need to create a child theme to translate the header media title using Polylang. Let me know if you are familiar with child theme customization so that I can guide you how to do it.
Kind Regards,
SkandhaFebruary 13, 2019 at 6:44 am #165775angrybirdParticipantI have created a child theme and it is active (has been all along).
February 14, 2019 at 1:18 am #165823SkandhaParticipant@ville123: Go to => Child Theme folder => functions.php and add the following Code.
function polylang_translation() { if ( function_exists( 'pll_register_string' ) ) { $header_media_title = get_theme_mod( 'catch_fullscreen_header_media_title', esc_html__( 'Dancing Under The Sky', 'catch-fullscreen-pro' ) ); pll_register_string( 'catch_fullscreen_header_media_title', $header_media_title, 'Catch Fullscreen Pro' ); //die('aaaa'); } } add_action ( 'admin_init', 'polylang_translation' ); function catch_fullscreen_header_title( $before = '', $after = '' ) { if ( is_front_page() ) { $header_media_title = get_theme_mod( 'catch_fullscreen_header_media_title', esc_html__( 'Dancing Under The Sky', 'catch-fullscreen-pro' ) ); if ( $header_media_title ) { if( class_exists( 'Polylang' ) ) { echo $before . pll__( $header_media_title ) . $after; } else{ echo $before . wp_kses_post( $header_media_title ) . $after; } } } elseif ( is_singular() ) { if ( is_page() ) { if( ! get_theme_mod( 'catch_fullscreen_single_page_title' ) ) { the_title( $before, $after ); } } else { the_title( $before, $after ); } } elseif ( is_404() ) { echo $before . esc_html__( 'Nothing Found', 'catch-fullscreen-pro' ) . $after; } elseif ( is_search() ) { /* translators: %s: search query. */ echo $before . sprintf( esc_html__( 'Search Results for: %s', 'catch-fullscreen-pro' ), '<span>' . get_search_query() . '</span>' ) . $after; } else { the_archive_title( $before, $after ); } }
Now, you should be able to translate the Header Media Title when you Go to => Dashboard => Languages => String Translation.
Let me know if this works out!
Kind Regards,
SkandhaFebruary 26, 2019 at 5:15 am #166725angrybirdParticipantYes it worked, thank you!
February 27, 2019 at 1:57 am #166814SkandhaParticipant@ville123: Hello there, I hope I was able to resolve your issue. If it’s not too much trouble, I have a quick request: could you please leave an honest review?
https://wordpress.org/support/theme/catch-fullscreen/reviews/#new-post
Your review will help others know what to expect when they’re looking for the support I offer. Even a sentence or two would be hugely appreciated. Thanks, and if there’s anything else at all that I can do to help, don’t hesitate to let me know. Have a good day! 🙂Kind Regards,
Skandha -
AuthorPosts
- The topic ‘Header media title and Polylang’ is closed to new replies.