-
AuthorPosts
-
September 9, 2014 at 8:22 am #101411
Hi
How do i put the google translate flags from this page http://www.nerdproductions.dk/tangent-element-tk up in the menu or in the topbar next to the social icons?
my site is http://www.nerdproductions.dk/
i use the Google Language Translator plugin. and have used a shortcode to input the flags.
i have tried to mess around the the php but can not get it to work
thanks in advance
September 9, 2014 at 9:54 am #101483Hi Bo,
Thanks for writing in!
At first, I’d advise that you setup a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.
Now, open the functions.php file of your child theme. Then add the following codes into it:
add_filter('theme_x_topbar_content','x_topbar_do_shortcode'); function x_topbar_do_shortcode($content) { return do_shortcode( $content ); }
Then go to Appearance > Customize > Header > Enable Topbar content & add the shortcode of Translate plugin there.
Hope these helps, Cheers!
September 10, 2014 at 6:39 am #101946Hi
thanks for your reply!
I have done as you told me, but it seems that the shortcode still isnt working. Do you have any suggestions? link: http://www.nerdproductions.dk/
my functions.php in the child theme now looks like this:
<?php
// =============================================================================
// FUNCTIONS.PHP
// —————————————————————————–
// Overwrite or add your own custom functions to X in this file.
// =============================================================================add_filter(‘theme_x_topbar_content’,’x_topbar_do_shortcode’);
function x_topbar_do_shortcode($content) {
return do_shortcode( $content );
}
?>September 10, 2014 at 9:42 am #102037Hi Bo,
You’re using slight old version of X theme, At first please update your theme to latest version 2.4.0 by following this KB article: Updating Your Theme and Plugins.
If the update not resolves the issue then, Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:
– Link to your site
– WordPress Admin username / password
– FTP credentialsDon’t forget to select Set as private reply. This ensures your information is only visible to our staff.
September 11, 2014 at 4:56 am #102620This reply has been marked as private.September 11, 2014 at 6:09 am #102647Hi Bo,
Sorry about that.
Can you try the steps below instead.
1. Create the file /wp-content/themes/x-child-integrity-light/framework/views/global/_topbar.php
2. Paste the code below in /wp-content/themes/x-child-integrity-light/framework/views/global/_topbar.php
<?php // ============================================================================= // VIEWS/GLOBAL/_TOPBAR.PHP // ----------------------------------------------------------------------------- // Includes topbar output. // ============================================================================= ?> <?php if ( x_get_option( 'x_topbar_display', 0 ) == 1 ) : ?> <div class="x-topbar"> <div class="x-topbar-inner x-container-fluid max width"> <?php if ( x_get_option( 'x_topbar_content' ) != '' ) : ?> <p class="p-info"><?php echo x_get_option( 'x_topbar_content' ); ?></p> <?php endif; ?> <?php x_social_global(); ?> <div class="gtranslate" style="float:right;"><?php echo do_shortcode('[google-translator]'); ?></div> </div> </div> <?php endif; ?>
3. You can add this under Custom > CSS in the Customizer.
.gtranslate div { display:inline-block; }
Thanks
September 11, 2014 at 1:05 pm #102922It works
thanks alot – very great support youve got going here
September 11, 2014 at 1:46 pm #102944Glad we were able to help.
Have a nice day.
November 23, 2014 at 7:22 am #150970This reply has been marked as private.November 23, 2014 at 10:29 pm #151260Hi there,
Can’t check your site,
1. The admin login has no permission to check and edit theme files.
2. FTP isn’t working.Thanks.
October 20, 2015 at 4:45 pm #633224What css tips can be used to have flags appear on a single line.
October 20, 2015 at 6:47 pm #633369Hey Bim,
You can increase the width of what’s currently in your CSS Customizer which is:
#flags { width: 165px; }
to something like:
#flags { width: 50%; }
Hope this helps.
October 22, 2015 at 7:37 pm #636280Perfection! Thanks much!
October 22, 2015 at 7:55 pm #636298Glad to hear that. You’re welcome.
Feel free to ask us again. Have a great day!
February 7, 2016 at 9:26 am #784149is this address correct: Paste the code below in /wp-content/themes/x-child-integrity-light/framework/views/global/_topbar.php
as my box appears at the bottom of the page?
-
AuthorPosts