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

118
Views
js in Wordpress functions.php | how to open url in new tab

how can i open the url at the top in a new tab? thanks! i am not sure where to add it. and actually my questions is pretty simple, but i have to write more text since stackoverflow wants me to have a certain amount of text that is not code. so here we go. i hope you are all doing great.

    $phone_number = '01626513155';
    $content = 'Wie können wir dir helfen?';

    $link = sprintf(
        'https://api.whatsapp.com/send/?phone=%2B491626513155&text&type=phone_number&app_absent=0',
        $phone_number, rawurlencode($content)
    );
    $style = '.lava_whatsapp {
        border: 1px solid #249235;
        border-radius: 10px;
        padding: 10px 30px 10px 55px;
        background-color: #FFFFFF;
        color: #249235;
        text-decoration: none;

        background: url(/wp-content/uploads/whatsapp_logo_green.svg);
        background-repeat: no-repeat;
        background-size: 30px 30px;
        background-repeat: no-repeat;
        background-position: 10px center;
    }

    .lava_whatsapp:hover {
        border: 0;
        background-color: #249235;
        color: #FFFFFF;
    }';

    echo '<style>'.$style.'</style>';
    echo '<a href="'.$link.'" class="lava_whatsapp">Fragen zum Produkt?</a>';
}

add_action( 'woocommerce_single_product_summary', 'lava_add_whatsapp_button', 30 );```
about 4 years ago · Santiago Gelvez
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!