• 24-07-2025, 17:05:08
    #1
    Backlink = Güven 🔗
    Selamlar no-follow algılandığı için bazı linkleri değiştirmem gerekiyor.
    Örnek veriyorum

    <a> href="https://api.whatsapp.com/send/?phone=908508408270&amp;text&amp;type=phone_number &amp;app_absent=0" </a>
    şeklinde bir linkimiz olduğunu düşünelim link nofollow özellikli geçiyor bu doğru bunda sorun yok yapmak istediğim şey href olan linki html attributesi olan onclick ile değiştirmek istiyorum
    Tek tek uğraşması zor oluyor çünkü 100 e sayfa var ve her sayfada 2-3 link bulunuyor
    bunu toplu halde kısa yoldan nasıl halledebilirim
    yardımcı olabilecek varsa şimdiden teşekkür ederim
  • 24-07-2025, 17:16:06
    #2
    WordPress admin panelinden
    Görünüm → Tema Dosya Düzenleyici → footer.php dosyasını aç.
    </body> etiketinden hemen önce aşağıdaki kodu ekle:

    <script>
    document.addEventListener("DOMContentLoaded", function () { document.querySelectorAll('a[href*="api.whatsapp.com"]').forEach(function (a) { const originalHref = a.getAttribute('href'); a.setAttribute('onclick', `window.location.href='${originalHref}'; return false;`); a.setAttribute('href', '#'); }); });
    </script>
    • Sayfa yüklendiğinde tüm api.whatsapp.com içeren href'leri bulur.
    • Onları onclick fonksiyonuna çevirir.
    • href'i # yapar, yani SEO botları görmez.
  • 24-07-2025, 17:17:22
    #3
    Backlink = Güven 🔗
    Saysa adlı üyeden alıntı: mesajı görüntüle
    WordPress admin panelinden
    Görünüm → Tema Dosya Düzenleyici → footer.php dosyasını aç.
    </body> etiketinden hemen önce aşağıdaki kodu ekle:

    <script>
    document.addEventListener("DOMContentLoaded", function () { document.querySelectorAll('a[href*="api.whatsapp.com"]').forEach(function (a) { const originalHref = a.getAttribute('href'); a.setAttribute('onclick', `window.location.href='${originalHref}'; return false;`); a.setAttribute('href', '#'); }); });
    </script>
    • Sayfa yüklendiğinde tüm api.whatsapp.com içeren href'leri bulur.
    • Onları onclick fonksiyonuna çevirir.
    • href'i # yapar, yani SEO botları görmez.
    hocam gpt ye sorduysan 10 farklı kod denedim olmadı xd
  • 24-07-2025, 17:19:56
    #4
    Hayır hocam bu kod çalışıyor aynı sorunu bende yaşamıştım.
  • 24-07-2025, 17:20:55
    #5
    Temadan kaynaklı sorun da olabilir hocam.
  • 24-07-2025, 17:27:46
    #6
    Backlink = Güven 🔗
    Saysa adlı üyeden alıntı: mesajı görüntüle
    Hayır hocam bu kod çalışıyor aynı sorunu bende yaşamıştım.
    deniyorum şimdi

    edit maalesef çalışmadı hocam
  • 24-07-2025, 22:58:59
    #7
    <script>
    document.addEventListener('DOMContentLoaded', () => {
      document.querySelectorAll('a[href*="api.whatsapp.com"]').forEach(a => {
        const url = a.getAttribute('href');
        a.removeAttribute('href');
        a.setAttribute('onclick', `window.open('${url}','_blank')`);
      });
    });
    </script>
    bunu dener misiniz?
  • 24-07-2025, 23:15:39
    #8
    Backlink = Güven 🔗
    Barhalli adlı üyeden alıntı: mesajı görüntüle
    <script>
    document.addEventListener('DOMContentLoaded', () => {
      document.querySelectorAll('a[href*="api.whatsapp.com"]').forEach(a => {
        const url = a.getAttribute('href');
        a.removeAttribute('href');
        a.setAttribute('onclick', `window.open('${url}','_blank')`);
      });
    });
    </script>
    bunu dener misiniz?
    denedim hocam maalesef çalışmadı
  • 25-07-2025, 01:16:42
    #9
    Developer
    <script>
    document.addEventListener('DOMContentLoaded', () => {
      document.querySelectorAll('a[href*="api.whatsapp.com"]').forEach(a => {
        const url = a.href;
        a.removeAttribute('href');
        a.addEventListener('click', e => {
          e.preventDefault();
          window.open(url, '_blank');
        });
      });
    });
    </script>