Blog

Usefull posts & informations

PREMIUM WORDPRESS THEME: AzualApp

AzualApp is a WordPress Theme I convered after experimenting with my framework.
It uses a dark cholor scheme along with a transparent header, since people always tell me how much they like this combination 😉

The theme uses some of the code snippets I created for my WordPress Framework as well as for my jQuery framework.

Some of the features that are included:
  • Easily change theme colors from admin options page.
  • Easily choose Google Fonts (with font preview) via admin options page.
  • Powerfull Admin Panel
  • 3 Home page variations ( Fullscreen Slideshow / Static Image / Video Background
  • Inline video support (YouTube / Vimeo).
  • Parallax effect section backgrounds.
  • Section content reveal animation.
  • 1-click demo import.
  • Auto updates via Envato API
  • WPML multi-language support.
  • RTL Built-In.
  • Shortcode editor.
  • Slider/Image/Video formats supported for Posts and Projects.
  • Drag and drop gallery management.
  • Custom per thumbnail cropping.
  • Localization ready, pot file included.
  • Built on a full OOP, WordPress framework.
  • Network install compatible.
  • Child Themes Ready.
  • Developed with WP_DEBUG and Debogger enabled.
  • Works in all major Browsers (IE6, IE7 , Safari, Firefox, Edge, Opera, Google Chrome)
  • Demo Version here

Language call different style.css in WPML Multilingual

Method #1

If the language code is en, get stye-en.css and if it is es, get style-es.css.

I just do not know where to add the stylesheet for each. I tried fiddling around but was unsuccessful.

I will post here my setup so you can see what i have:

Language codes:
en (main English page)
es (main Spanish page)
pt-br (main Portuguese page)
en_bol (Bolivia English Page)
es_bol (Bolivia Spanish page)
en_ar (Argentina English page)
es_ar (Argentina Spanish page)
etc…(more countries)

The main website has “en”, “es” and “pt-br” as languages that will use the same stylesheet, main-style.css.

“en_bol” and “es_bol” will use another stylesheet, bol-style.css.

“en_ar” and “es_ar” will use another stylesheet, ar-style.css…etc..

You can do this with the code below. This will insert a class in the body tag:

1
2
3
4
5
6
7
8
9
//functions.php
function wpml_lang_body_class($classes) {
    if(defined('ICL_LANGUAGE_CODE')) {
        $classes[] = "lang-" . ICL_LANGUAGE_CODE;
    }
    
    return $classes;
}
add_filter('body_class','wpml_lang_body_class');

You can also use the ICL_LANGUAGE_CODE:

1
2
3
4
5
6
7
//header.php
if(ICL_LANGUAGE_CODE == 'en'){
     //load english style - style-en.css.
     //<style....
} else if(ICL_LANGUAGE_CODE == 'es'){
     //load spanish style - style-es.css.
}

<code>

//functions.php
function wpml_lang_body_class($classes) {
    if(defined('ICL_LANGUAGE_CODE')) {
        $classes[] = "lang-" . ICL_LANGUAGE_CODE;
    }
    
    return $classes;
}
add_filter('body_class','wpml_lang_body_class');

</code>