• Piuomenoassociati

    (@piuomenoassociati)


    good morning, i need help with this plugin.

    i had to make a custom link in an header position, so in the header.php i added this line
    <div class="areariservata"> <a href="http://apoc.piuomenoassociati.it/area-riservata/"> Area Riservata</a> </div>

    obviously this is a static link….

    how can i make it dynamic and compatible with qtranslate? is there a way to specify that if the user is navigating in the ” ?lang=en ” part of the site, it should load a different link?
    (something like an IF function, i’m sure in php there is that function, but i don’t know so much php )?

    thanks a lot

Viewing 1 replies (of 1 total)
  • Brad Adams

    (@bradadams)

    Piuomenoassociati, you may have to tweak this a bit to get it working with your site correctly, but it’ll probably be something like this:

    <div class="areariservata">
        <a href="<?php echo site_url()."/?lang=".qtrans_getLanguage();?>/area-riservata/">
            Area Riservata
        </a>
    </div>

    Depending whether apoc.piuomenoassociati.it is your sites main URL or not this may not work, if not, try:

    <div class="areariservata">
        <a href="http://apoc.piuomenoassociati.it<?php echo "/?lang=".qtrans_getLanguage();?>/area-riservata/">
            Area Riservata
        </a>
    </div>
Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Qtranslate] Making a custom link compatible’ is closed to new replies.