MicrostockGroup Sponsors


Author Topic: Adding widget to header (Translator)  (Read 2948 times)

0 Members and 1 Guest are viewing this topic.

« on: April 14, 2013, 04:09 »
0
I have sort of added a widget to the header (that I think could be very useful for many of us) by editing the parent Symbiostock relevant php file.  Does anyone know how I can do this using the child css, I have been trying for a while but have not yet been able to work it out.
« Last Edit: April 15, 2013, 02:27 by Tinny »


« Reply #1 on: April 14, 2013, 14:06 »
0
I forgot to say what it was   ::)   A translator - prompted by the different countries that are finding me via google

« Reply #2 on: April 14, 2013, 15:25 »
0
I forgot to say what it was   ::)   A translator - prompted by the different countries that are finding me via google

That sounds useful. I'm not sure you can edit php in the css editor. I think I remember reading that you can edit php pages by adding code to the functions.php page. You might want to check into that.

« Reply #3 on: April 14, 2013, 16:53 »
0
I forgot to say what it was   ::)   A translator - prompted by the different countries that are finding me via google

Hmm, interesting. But how does this work? When I click on a flag nothing happens...

« Reply #4 on: April 15, 2013, 01:30 »
0
When I click on it it brings up a dropdow box with lots of flags, just
click on onr of those to get relevant translation, works on firefox and android for me

« Reply #5 on: April 15, 2013, 01:58 »
0
I am in Canada, use Firefox, click on the German flag and... nothing happens :(

« Reply #6 on: April 15, 2013, 02:30 »
0

That sounds useful. I'm not sure you can edit php in the css editor. I think I remember reading that you can edit php pages by adding code to the functions.php page. You might want to check into that.

I will have another look at that thanks

Does it work/not work for anyone else?   I do not want to spend a lot (more) time working it out if it does not work for most people

« Reply #7 on: April 15, 2013, 02:36 »
0
Word of advice - DO NOT play with functions.php in the child theme if you do not know what you are doing.  Everything goes white and your site totally disappears, everything, all gone!

Another word of advice :)   - if it does happen just go into the child theme using ftp or via your cpanel and delete the child themes  functions.php file, easy to reupload again from the files you have on your computer

« Reply #8 on: April 15, 2013, 02:54 »
0

That sounds useful. I'm not sure you can edit php in the css editor. I think I remember reading that you can edit php pages by adding code to the functions.php page. You might want to check into that.

I will have another look at that thanks

Does it work/not work for anyone else?   I do not want to spend a lot (more) time working it out if it does not work for most people

Works for me, Firefox 20.0.1 on Windows 7. Looked at your site in French and Chinese...

« Reply #9 on: April 15, 2013, 03:07 »
0
Works for me, Firefox 20.0.1 on Windows 7. Looked at your site in French and Chinese...

Thank you.  Now I know it works for someone else I will show what I have done so far.
Plug in:  "Translate this Button"    and made my own button as did not like the one they had, I would really like to have the text in the site and add the button with just flags but that is miles beyond me.

In the parent Sybiostock header.php file (which I know I will have to change every time if I cannot find a better way)
~~~~~~~~
               symbiostock_above_header_nav( );
               ?>
                    </div>
                   

                </div>       
                        <?php
                //get the search form
                include_once('searchform_symbiostock.php');
                ?>
                <?php translate_this_button(); ?>  <-------ADDED THIS LINE HERE
            </div>
        </div>
       
      <div class="row">
       
         <nav role="navigation" class="site-navigation main-navigation">
~~~~~~~~~~~~~~~~~~~~~~

« Reply #10 on: April 15, 2013, 05:38 »
0
It works for me too and I put it also on my page, but it is still to low or to high :)

« Reply #11 on: April 15, 2013, 05:54 »
0
If anyone can get it right and put it in the child theme please post the code, ideally I wanted it just under or above the search box as that is the usual place to look when you want a translation on a site but it took me long enough to get it where it is :)

« Reply #12 on: April 15, 2013, 14:02 »
0
I checked out your site again. Now your translator button works great. I wonder what it was the first time. Maybe a Firefox hickup at my end ? Don't know...

I checked the quality of the German translation: It is not bad. Sure, you still notice it is machine translated but I've seen much worse.

Useful button/function. I want it, too. But I don't want to fool with coding it in every time I update my site. So far I had not much luck with the child theme apart from styles.css. But I am a bloody beginner with wp and php. So that doesn't mean too much.

If there's enough interest maybe Leo could include the button as an option.


 

Related Topics

  Subject / Started by Replies Last post
5 Replies
4923 Views
Last post July 03, 2008, 00:05
by eugenef
0 Replies
1716 Views
Last post July 25, 2011, 08:40
by mtkang
4 Replies
3392 Views
Last post February 04, 2013, 16:35
by gillian vann
13 Replies
3740 Views
Last post April 05, 2013, 18:42
by cathyslife
2 Replies
3123 Views
Last post August 26, 2013, 05:34
by eZeePics

Sponsors

Mega Bundle of 5,900+ Professional Lightroom Presets

Microstock Poll Results

Sponsors