Jump to content


Photo
- - - - -

positioning qtranslate plugin within the header


  • Please log in to reply
15 replies to this topic

#1 yasharozov

yasharozov

    Advanced Member

  • Members

  • 43 posts
  • Country: Country Flag

Posted 08 June 2013 - 07:17 PM

Hi,
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 

Please Login or Register to see this Hidden Content

   - you can see the qtranslate widget is now positioned to the left and bottom of the logo and just takes up space....



#2 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 08 June 2013 - 08:07 PM

Hi,

 

That code may be added to the header area as a

Please Login or Register to see this Hidden Content

, 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 the

Please Login or Register to see this Hidden Content

plugin (free in our Store) along with the

Please Login or Register to see this Hidden Content

plugin, also free in the Store. 

 

Optionally, you can use the

Please Login or Register to see this Hidden Content

which 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:

Please Login or Register to see this Hidden Content

By doing that, you have the ability to add some simple CSS to your Custom Code, such as:

Please Login or Register to see this Hidden Content

Rest assured, it will be essential to style, position or otherwise affect the appearance of the QTranslate you add to the header.



#3 yasharozov

yasharozov

    Advanced Member

  • Members

  • 43 posts
  • Country: Country Flag

Posted 08 June 2013 - 08:30 PM

Thank You very much Rob. I will try it out and report back if any trouble...



#4 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 08 June 2013 - 08:33 PM

You're very welcome.  Keep us updated about your progress.



#5 yasharozov

yasharozov

    Advanced Member

  • Members

  • 43 posts
  • Country: Country Flag

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....



#6 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 08 June 2013 - 09:02 PM

Hi,

 

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?



#7 yasharozov

yasharozov

    Advanced Member

  • Members

  • 43 posts
  • Country: Country Flag

Posted 08 June 2013 - 09:07 PM

Yes I did....any ideas?



#8 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 08 June 2013 - 09:10 PM

Create a new Admin level user and email the details to robert@pagelines.com.  I'll login and have a look. 



#9 yasharozov

yasharozov

    Advanced Member

  • Members

  • 43 posts
  • Country: Country Flag

Posted 08 June 2013 - 09:12 PM

sent...



#10 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 08 June 2013 - 09:34 PM

Nothing received yet.  Please make sure credentials are sent to robert@pagelines.com.



#11 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 08 June 2013 - 11:30 PM

Hi,

 

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.



#12 yasharozov

yasharozov

    Advanced Member

  • Members

  • 43 posts
  • Country: Country Flag

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...



#13 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

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.



#14 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 09 June 2013 - 03:28 PM

Yasha,

 

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:

Please Login or Register to see this Hidden Content

This will make Hooker work.



#15 yasharozov

yasharozov

    Advanced Member

  • Members

  • 43 posts
  • Country: Country Flag

Posted 09 June 2013 - 03:44 PM

Great - I'll check it and report back. Thx so much



#16 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 09 June 2013 - 03:51 PM

Super. No problem.