• Resolved bluedrag

    (@bluedrag)


    I’m trying to link to a location lower on the same page using

    
    <!--:en-->
    <ul id="nav">
    <li><a href="<?php echo ppqtrans_convertURL('https://coastmusic.com/gold/' .$lang); ?>">">Home</a></li>
    <li><a href="<?php echo ppqtrans_convertURL('https://coastmusic.com/gold/index.php/features/' .$lang); ?>">">Features</a></li>
    <li><a href="<?php echo ppqtrans_convertURL('https://coastmusic.com/gold#wheretobuy/' .$lang); ?>">">Where to Buy</a></li>
    </ul>
    <!--:-->
    
    <!--:fr-->
    <ul id="nav">
    <li><a href="<?php echo ppqtrans_convertURL('https://coastmusic.com/gold/' .$lang); ?>">">Acceuil</a></li>
    <li><a href="<?php echo ppqtrans_convertURL('https://coastmusic.com/gold/index.php/features/' .$lang); ?>">">Charactéristiques</a></li>
    <li><a href="<?php echo ppqtrans_convertURL('https://coastmusic.com/gold#wheretobuy' .$lang); ?>">">Ou Acheter</a></li>
    </ul>
    <!--:-->
    

    and lower on the page, it links to this:

    <a name="wheretobuy"></a>

    It was working without qtranslate, but I seem to be having trouble with the ppqtrans_convertURL() function around my links. Any advice?

    edit: I know the “ppq” part of these functions are wrong, I am using a different unofficial version of translate x until the widget issue is fixed on WP 4.8

    • This topic was modified 7 years ago by bluedrag.
Viewing 1 replies (of 1 total)
  • Thread Starter bluedrag

    (@bluedrag)

    I fixed the issue! Frirstly I noticed the $lang concatenation is redundant, so I removed it, and then I added another echo at the end of the link to make sure #wheretobuy is after the language code:

    
    <!--:en-->
    <ul id="nav">
    <li><a href="<?php echo ppqtrans_convertURL('https://coastmusic.com/gold/'); ?>">Home</a></li>
    <li><a href="<?php echo ppqtrans_convertURL('https://coastmusic.com/gold/index.php/features/'); ?>">Features</a></li>
    <li><a href="<?php echo ppqtrans_convertURL('https://coastmusic.com/gold#wheretobuy'); ?>">Where to Buy</a></li>
    </ul>
    <!--:-->
    <!--:fr-->
    <ul id="nav">
    <li><a href="<?php echo ppqtrans_convertURL('https://coastmusic.com/gold/'); ?>">Acceuil</a></li>
    <li><a href="<?php echo ppqtrans_convertURL('https://coastmusic.com/gold/index.php/features/'); ?>">Charactéristiques</a></li>
    <li><a href="<?php echo ppqtrans_convertURL('https://coastmusic.com/gold'); echo '#wheretobuy'; ?>">Ou Acheter</a></li>
    </ul>
    <!--:-->
    
Viewing 1 replies (of 1 total)
  • The topic ‘on page links not working’ is closed to new replies.