Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

125
Views
Dynamically update button href with language of page (WordPress)

I am working on a site that has products that have downloadable PDFs for each product. Im using ACF to attach files to the product to download. The site has to be able to translate from English to French and when you switch the language it also has to download the French PDF and not the English. I am using Beaver Builder and have setup the English buttons using wpbb short codes to get the link of the product. I am using TranslatePress to translate the page and the url link includes /en/ or /fr/ respectively to the language. I need a way to hide French download buttons when in English and vice versa when in French. Open to any solutions.

<div id="en_buttons">
    <div class="buttons">
        <a href="[wpbb post:acf type='file' name='sds_en']" target="_blank"><button class="sds">SDS</button></a>
        <a href="[wpbb post:acf type='file' name='tds_en']" target="_blank"><button class="tds">TDS</button></a>
    </div>
</div>

<div id="fr_buttons">
      <div class="buttons">
        <a href="[wpbb post:acf type='file' name='sds_fr']" target="_blank"><button class="sds">SDS</button></a>
        <a href="[wpbb post:acf type='file' name='tds_fr']" target="_blank"><button class="tds">TDS</button></a>
    </div>
</div>
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!