I would like to have the qtranslate plugin widget positioned above the 'share' buttons near the site logo/header. I need to put this code: (<?php echo qtrans_generateLanguageSelectCode('both'); ?>) into, I guess, one of the page templates or files. Can someone give me a filename or direction on this?
see my page at
positioning qtranslate plugin within the header
Posted 08 June 2013 - 07:17 PM
Posted 08 June 2013 - 08:07 PM
That code may be added to the header area as a, which is the best possible way to add it.
If you are using a child theme, you'll add this hook into the functions.php file within the child theme.
If not, you will want to install or use theplugin (free in our Store) along with the plugin, also free in the Store.
Optionally, you can use thewhich saves you doing the coding. Use Hooker in conjunction with Action Map. The Action Map helps you identify the hook (area) that exists where you want to place your code. Once you've found it, using Hooker, you just select that hook from the drop down list, and paste your code.
The only critical recommendation I'd make to you is that you wrap the php code in a div with a custom class as such:
By doing that, you have the ability to add some simple CSS to your Custom Code, such as:
Rest assured, it will be essential to style, position or otherwise affect the appearance of the QTranslate you add to the header.
Posted 08 June 2013 - 08:30 PM
Thank You very much Rob. I will try it out and report back if any trouble...
Posted 08 June 2013 - 08:33 PM
You're very welcome. Keep us updated about your progress.
Posted 08 June 2013 - 08:56 PM
Mmm. I purchased the hooker plugin which I installed, activated and added a new hook - before branding icons. I entered the qtranslate php code there and no go....
Posted 08 June 2013 - 09:02 PM
Did you add the code with the div I recommended as well? And did you add the Custom CSS to Dashboard > PageLines > Site Options > Custom Code?
Posted 08 June 2013 - 09:10 PM
Create a new Admin level user and email the details to firstname.lastname@example.org. I'll login and have a look.
Posted 08 June 2013 - 09:34 PM
Nothing received yet. Please make sure credentials are sent to email@example.com.
Posted 08 June 2013 - 11:30 PM
For some reason, it didn't seem to work correctly until I implemented it using PageLines Customize and activated that. I've deactivated Action Map.
The flags are now present. You're going to have to style them as you desire. Presently they show as a bulleted vertical list following the social media icons. They are picking up styling from qTranslate, not PageLines. Please seek support from them for styling. You may also use Firebug for Firefox or Chrome's Inspection Tool to find the correct CSS. Once found, it may be added to Dashboard > PageLines > Site Options > Custom Code.
Hooker wasn't working correctly, likely due to a plugin conflict.
Posted 09 June 2013 - 11:19 AM
Thanks very much for your help and persistence Rob. I'll investigate the styling issues.
- Any idea what hooker conflicts with? Would like to get it working at some point...
Posted 09 June 2013 - 01:41 PM
I plan to follow up with the developer as soon as he's on duty, likely Monday. I'll reply here as soon as I hear back from him.
Posted 09 June 2013 - 03:28 PM
FTP into your site and find the wp-config.php file.
Open it for editing in a text editor (not Word or WordPad).
Find define('WP_DEBUG', false);
Then below it, insert a new line and add:
This will make Hooker work.