Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Header configuration & styling »

[SOLVED] WPML & Atahualpa -> How to place a horizontal language switch in the header


  #1  
Old Jul 3, 2011, 10:12 AM
Flavio
 
5 posts · Jul 2011
Hi

I am copying a question I also posted on WPML forum, hope I can get help from one side or another

I am using the latest current versions of WP (3.1.4), Atahualpa (3.6.7) and WPML (2.3.2 - CMS commercial version).

Actually the main reason for upgrading to the commercial version of WPML, was that I hoped I could get more options to integrate the switch within the theme... but I can't see any change in the available options. Did I miss anything?

Anyway... my goal is... to place the language switch as in this site: http://www.pietvanoostrum.com/en/ ie. in the header area (Menu 1) floating at the right. The switch is horizontal (like in the "standard footer" which one can choose in WPML settings).

If you can help, please, I need a truly "step-by-step" guide... I am far from being a literate in CSS!

Anyone can help? Thank you!
  #2  
Old Jul 4, 2011, 06:59 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
looking at the source of that page, they just added a <div>...</div> with the appropriate links and images to ATO->Style & edit HEADER AREA->Configure Header Area just before the %pages
Then they used CSS Inserts to move it to where it exists.

If you use FireBug in FireFox. you will be able to go in and examine how they did it.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old Jul 6, 2011, 04:19 AM
Flavio
 
5 posts · Jul 2011
@juggledad

Thanks for having a look at the issue.

After posting in this forum, I got a feedback from the author of the blog. He mentioned, that he had input the following code in the options of ATO -> Style & Edit Header Area

<code>%logo %bar1 %image %bar2 <?php do_action('icl_language_selector'); ?>
%pages</code>

i.e. he injected a PHP code there (the code is taken from WPML instructions)... at the time ATO allowed this

Therefore the question now is... where can I place the line <?php do_action('icl_language_selector'); ?> (I assume I have to go to the theme edit, but which file? and where precisely within the file?

I assume it shouldn't be that complicated... for you, I mean (I am not very technical myself)...
  #4  
Old Jul 6, 2011, 06:27 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
because of WordPress restrictions, you can no longer use most php in the header area, but you can put a new widget area there and add a text widget to it, put the php in it and then using the 'exec-php' plugin, cause the code to be executed.

1) install the 'exec-php' plugin and activate it
2) change your 'Configure Header Area' option to include
HTML Code:
<?php bfa_widget_area('name=header_widget_area'); ?>
3) go visit the front page of the website (this causes that code to be run)
4) go to the widget area - you'll now see a new widget area 'header_widget_area'
5) add a text widget to that area
6) add the '<?php do_action('icl_language_selector'); ?>' to the text widget
you may need to use a CSS inserts to position the are
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #5  
Old Jul 6, 2011, 08:02 AM
Flavio
 
5 posts · Jul 2011
Great. Working fine... I just need to fine tune the styles, as you mentioned. Many thanks!

Bookmarks

Tags
wpml integration header



Similar Threads
Thread Thread Starter Forum Replies Last Post
Add WPML language selector above search box pickertgmbh Header configuration & styling 1 Jul 6, 2011 08:07 AM
Atahualpa & WPML basic problem Bogdan Plugins & Atahualpa 0 Oct 18, 2010 02:25 PM
[SOLVED] WPML 'bread crumbs' &amp; Atahualpa? JeromeH Plugins & Atahualpa 2 Aug 27, 2010 02:49 AM
How to Switch the Logo Area and Header Image tim5046 Header configuration & styling 1 Jun 2, 2009 01:43 PM


All times are GMT -6. The time now is 01:03 AM.


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.