• Hi there,

    Really noob question: I’m working my way through the thematic theme and am looking to insert the script that you get from google to provide a translation widget. My PHP is still extremely shaky and I’d love some advice if possible?

    So, I need to get this script:

    <div id=”google_translate_element”></div><script>
    function googleTranslateElementInit() {
    new google.translate.TranslateElement({
    pageLanguage: ‘en’,
    gaTrack: true,
    layout: google.translate.TranslateElement.InlineLayout.SIMPLE
    }, ‘google_translate_element’);
    }
    </script><script src=”//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit”></script>

    attached to the thematic_header action hook.

    (I’d rather do it this way than install a translate plugin if possible)

    Any advice or even a nudge in the right direction would be hugely appreciated!

    http://wordpress.org/extend/themes/thematic/

Viewing 1 replies (of 1 total)
  • Thread Starter furiousfrog

    (@furiousfrog)

    Never mind – the only way I’ve found to do this is to put the code directly in the header. Realise this isn’t the preferred way to do things within thematic but I must admit I find using functions.php to do almost everything quite intimidating and a little frustrating for a beginner.

    Is there a good beginner tutorial for thematic that covers custom posts/taxonomies or covers the range of hooks? I’ve been through the “build your own wicked wordpress themes” but this is quite linear and only really provides instructions to create a basic theme type. I need to use custom taxonomies and custom post types and I’m not having much luck finding good information that’s less than a few years old. The thematic wiki is not beginner-friendly so any advice would be welcome.

Viewing 1 replies (of 1 total)
  • The topic ‘[Theme: Thematic] how to echo google script for translate in functions php?’ is closed to new replies.