Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Kupası
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

WordPress’te Üstbilgi ve Altbilgi Kodu Nasıl Eklenir (Kolay Yol)

Editoryal Not: WPBeginner üzerindeki ortak bağlantılardan komisyon kazanıyoruz. Komisyonlar, editörlerimizin görüşlerini veya değerlendirmelerini etkilemez. Editoryal Süreç hakkında daha fazla bilgi edinin.

Hiç WordPress web sitenizin <header> veya <footer> bölümüne bazı kod parçacıkları eklemeniz istendi mi?

Google Analytics, Google Search Console, Facebook Pixel ve daha fazlası gibi web hizmetleriyle entegre olmaya çalışırken genellikle WordPress’te üstbilgi ve altbilgi kodu eklemeniz istenir.

WordPress üstbilgi veya altbilginize bazı özel CSS veya JavaScript kodları eklemenizi isteyebilecek WordPress eğitimleriyle de karşılaşabilirsiniz.

WordPress varsayılan olarak web sitenizin üstbilgi ve altbilgisine kod eklemek için bir seçenek sunmaz. Neyse ki, yeni başlayanlar için kolay bir çözüm var.

Bu makalede, WordPress’te üstbilgi ve altbilgi kodlarını nasıl kolayca ekleyebileceğinizi göstereceğiz. Amaç, WordPress tema dosyalarınızı doğrudan düzenlemeden kodu güvenli bir şekilde eklemektir.

How to Add Header and Footer Code in WordPress

WordPress Üstbilgi ve Altbilgi Kodu Eklemenin En İyi Yolu

WordPress üstbilgi ve altbilgi kodu eklemek istiyorsanız, üç olası çözüm vardır:

  1. Temanızın header.php ve footer.php dosyalarını düzenleyerek manuel olarak
  2. Temanızın yerleşik üstbilgi ve altbilgi kodu özelliği ile
  3. WordPress eklentisi kullanma

İlk seçenek acemi dostu değildir çünkü header.php ve footer.php dosyalarını doğrudan manuel olarak düzenleyerek üstbilgi ve altbilgi kodu eklemenizi gerektirir.

Bu yöntemi kullanmanın bir diğer dezavantajı ise temanıza bir güncelleme yüklediğinizde kodunuzun kaldırılacak olmasıdır.

İkinci seçenek ise temanızın yerleşik özelliğini kullanmaktır. Elegant Themes ve StudioPress’in Genesis Framework ‘ü gibi bazı WordPress temaları, WordPress üstbilgi ve altbilginize hızlı bir şekilde kod ve komut dosyası eklemek için yerleşik bir seçenek sunar.

Yerleşik özelliği olan bir tema kullanıyorsanız, bu güvenli ve basit bir çözüm gibi görünür. Ancak, temanızı değiştirirseniz, web sitenize eklenen tüm kod parçacıkları kaybolacaktır. Buna Google Search Console‘da site doğrulaması, Google Analytics aracılığıyla web sitesi analizi vb. dahildir.

Bu nedenle kullanıcılara her zaman üçüncü seçenek olan üstbilgi ve altbilgi eklentisini kullanmalarını öneriyoruz. Bu seçenek, WordPress’te üstbilgi ve altbilgi kodu eklemek için açık ara en kolay ve en güvenli yöntemdir.

Okuyucularımızdan gelen çok sayıda talep üzerine ekibimiz WPCode eklentisini geliştirdi.

WPCode

WPCode (eski adıyla Insert Headers and Footers) %100 ücretsiz bir kod parçacığı eklentisidir. WordPress’te üstbilgi ve altbilgiye kolayca kod eklemek için kullanabilirsiniz.

İşte WPCode eklentisini kullanmanın bazı avantajları:

1. Kolay, Hızlı ve Düzenli: Sitenizin üstbilgi ve altbilgisine kolay ve hızlı bir şekilde kod eklemenizi sağlar. Ayrıca, tüm altbilgi ve üstbilgi kodlarınızı tek bir yerde saklamanıza izin vererek sizi düzenli tutar.

2. Hataları Önler: Akıllı kod parçacığı doğrulaması, tema dosyalarınızı manuel olarak düzenlerseniz oluşabilecek hataları önlemeye yardımcı olur.

3. Endişelenmeden Temanızı Yükseltin veya Değiştirin: Eklenti, üstbilgi ve altbilgi kodunuzu ayrı bir yere kaydeder, böylece kodun silinmesinden endişe etmeden temanızı güncelleyebilir veya değiştirebilirsiniz.

Üstbilgi ve altbilgi komut dosyalarının yanı sıra, tema dosyalarınızı düzenlemeden özel PHP, JavaScript, CSS, HTML ve metin kodu parçacıklarını kolayca eklemek için WPCode’u da kullanabilirsiniz.

Ayrıca WPCode, en kullanışlı WordPress kod parçacıklarının tümünü bulabileceğiniz yerleşik bir parçacık kitaplığına sahiptir. Bu, otomatik güncellemeler, REST API, XML-RPC, yorumlar ve daha fazlası gibi istemediğiniz WordPress özelliklerini hızlı bir şekilde kaldırmanıza olanak tanır.

Not: Özel bulut snippet kütüphanesi, dönüştürme pikselleri, zamanlanmış snippetler, kod revizyonları ve daha fazlası gibi gelişmiş özellikler istiyorsanız WPCode Pro‘ya yükseltebilirsiniz.

Daha fazla ayrıntı için WordPress’e kolayca özel kod ekleme hakkındaki kılavuzumuzu okuyun.

Bununla birlikte, WPCode eklentisini kullanarak WordPress’te üstbilgi ve altbilgi kodunun nasıl kolayca ekleneceğini görelim.

Video Eğitimi

Subscribe to WPBeginner

Video eğitimini izlemek istemiyorsanız, aşağıdaki metin versiyonunu okumaya devam edebilirsiniz:

WordPress’te Üstbilgi ve Altbilgiye Kod Ekleme

Yapmanız gereken ilk şey ücretsiz WPCode eklentisini yüklemek ve etkinleştirmektir. Daha fazla ayrıntı için WordPress eklentisi yükleme hakkındaki adım adım kılavuzumuza bakın.

Eklenti etkinleştirildikten sonra, WordPress yönetici panelinizden Code Snippets ” Header & Footer bölümüne gidin. Bundan sonra, kodunuzu ekleyebileceğiniz bir ‘Üstbilgi’ kutusu göreceksiniz.

Add code to header and footer with WPCode

Aşağı kaydırırsanız, bir ‘Gövde’ ve bir ‘Altbilgi’ kutusu da göreceksiniz.

Header and footer script boxes WPCode

Kodu üç kutudan birine yapıştırmanız yeterlidir. İşiniz bittiğinde, ayarlarınızı kaydetmek için ‘Değişiklikleri Kaydet’ düğmesine tıklamayı unutmayın.

Eklenti artık kodu WordPress sitenizdeki ilgili konumlara otomatik olarak yükleyecektir.

Saklamak istemediğiniz kodları her zaman düzenleyebilir ve kaldırabilirsiniz.

Eklentiyi her zaman yüklü ve etkin tutmanız gerekir. Eklentinin devre dışı bırakılması sitenize tüm özel kodların eklenmesini durduracaktır.

Eklentiyi yanlışlıkla devre dışı bırakırsanız, kod hala WordPress veritabanınızda güvenli bir şekilde saklanacaktır. Eklentiyi yeniden yükleyebilir veya yeniden etkinleştirebilirsiniz ve kod tekrar görünmeye başlayacaktır.

Not: Kodun web sitenizin ön ucunda düzgün bir şekilde görünmesi için değişiklikleri kaydettikten sonra WordPress önbelleğinizi temizlemeniz gerekebilir.

Yeni başlayanların çoğunun WPCode eklentisini kullanmasının en büyük nedeninin web sitelerine Google Analytics eklemek olduğunu gördük. Bunun için aslında ücretsiz MonsterInsights eklentisini kullanmanızı öneririz.

MonsterInsights, WordPress için en iyi Google analitik eklentisidir. Sadece birkaç tıklamayla Google Analytics takibini düzgün bir şekilde kurmanıza yardımcı olur ve size doğrudan WordPress panonuzun içinde yararlı istatistikler gösterir.

Adım adım talimatlar için WordPress’te Google Analytics’in nasıl kurulacağına ilişkin bu eğitime bakın.

Umarız bu makale WordPress’te üstbilgi ve altbilgi kodlarının nasıl kolayca ekleneceğini öğrenmenize yardımcı olmuştur. En iyi e-posta pazarlama hizmetleri ve en iyi iş telefonu hizmetleri karşılaştırmamızı da görmek isteyebilirsiniz.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Açıklama: İçeriğimiz okuyucu desteklidir. Bu, bazı bağlantılarımıza tıklarsanız komisyon kazanabileceğimiz anlamına gelir. WPBeginner'ın nasıl finanse edildiğini, neden önemli olduğunu ve nasıl destek olabileceğinizi görün. İşte editoryal sürecimiz.

Avatar

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

Ultimate WordPress Araç Kiti

Araç setimize ÜCRETSİZ erişim sağlayın - her profesyonelin sahip olması gereken WordPress ile ilgili ürün ve kaynaklardan oluşan bir koleksiyon!

Reader Interactions

267 yorumBir Cevap Bırakın

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

    • WPBeginner Support says

      You would want to check with your specific theme’s support for the header not appearing on a specific page as it could be a page specific template causing you issues.

      Yönetici

  2. Lio says

    Thanks guys for your plugin! I used it to add FB Pixel to my site, but now I have a landing page and I need a different Pixel event (Lead) on the Thank You page after visitors confirm their details. Can I use the plugin to add the script to a specific page?

  3. Keith says

    Hi, is there a way to change the font size of the footer?
    I tried keying in a chunk of disclaimer text but it is too large.

    Thanks in advance!

    • WPBeginner Support says

      If you mean a WordPress.com site then they currently don’t allow Adsense on their free plan.

      Yönetici

  4. Jeremy says

    I’m trying to connect my website to adsense in order to set up an account.
    So far google did not see the code.

    • WPBeginner Support says

      You may want to ensure you’ve cleared any caching on your site as one of the most common reason

      Yönetici

  5. PJ says

    You need to change your messaging/advertising regarding header/footer plug-in being free to install. It is not free unless you have purchased the Business plan for your page.

  6. Dipak says

    How many codes we can add in single header or footer section, I mean can i use two or three codes in single header section like facebook code google code etc.

    • WPBeginner Support says

      You could certainly add as many codes as you need in the header section depending on your needs.

      Yönetici

  7. Michael says

    Was wondering if PHP can be added in the header section. Like adding Yoast’s Breadcrumb code to the header so I don’t have to go into my theme files.

  8. Ray Sagacious Ashia says

    Can You add more than one header code, to the plug-in, for example
    AdSense code and YouTube Verification code.

  9. Adewale Mudasiru says

    Hi, I’m trying to add a javascript to my site header but on click on save it says page not found

    • WPBeginner Support says

      You may want to try resaving your permalinks and checking with your hosting provider that they are not receiving an error on your site that would be preventing the page from saving.

      Yönetici

  10. Poonam Kandpal says

    Thank you so much for your video, although I have copied the code still I’m not able to enable my header. How to do it?

    • WPBeginner Support says

      If the plugin is installed you should be able to add the code under Settings>Insert Headers and Footers

      Yönetici

  11. Faris Naqib says

    Hi. I already install the plugin and it’s work. But how to add more than 1 code? Just copy like that or I need to make 1 space to copy the code

    • WPBeginner Support says

      In case you need to edit the code later, it is normally best to add the new code on the next line

      Yönetici

  12. rodrigo says

    Cant update “Insert Headers and Footers Plugin”.
    Error message: Update Error: Not possible to eliminate previous version of plugin. (translation from spanish)

    When trying to remove the plugin: ” insert-headers-and-footers-old/ihaf.php could not be removed completely .” (translation from spanish)

  13. Marcus says

    Hi,

    After I insert the Header code, when I click “save”, will auto link to Page 404 error. How can I fix it?

  14. Judy says

    Can I add multiple/different codes in the headers sections? ie. one from google analytics and one from blogmote

  15. Jon says

    I have another plugin it seems to work almost exactly the same way only it can be used on a single page or customized as to which pages the script is added.

    I am trying the WpBeginner plugin just because I trust y’all.

    Am I likely to run into problems having both added to my site?

    Using yours for the whole site, and the other one for adding something only to the header or footer of an individual page?

  16. maddy says

    Hello,
    I’m trying to update something in my footer section.
    I have already downloaded and installed/ used this plug in previously and it is working currently. However, when I try to go edit it, when my cursor is hovering over settings…. no drop out menu appears to go to –>insert header and footer. It only takes me to my account setting page. Please help me because I need to update my mailing list options asap! Thank you!

    • WPBeginner Support says

      If you go to your settings area, it should expand the other options for you to be able to see the Insert Headers and Footers menu item.

      Yönetici

  17. SirPhren says

    Thanks WPbeginer,

    I tried saving the plugin when I added my google search console code, it redirected me to error 404.

    What could be wrong?

  18. Kanyi Daily says

    Should i deactivate and delete the plugin after inserting the code?

    Will the code be deleted as soon as the plugin is deactivated?

    • WPBeginner Support says

      You would want to leave the plugin active, if you deactivate the plugin the code you’ve added will no longer be included.

      Yönetici

  19. Kirsty Bennetts says

    Hello. I’ve been using this plugin for some time and find it invaluable.
    However, I am about to update to WordPress 5 but on the download page, it says ‘Compatible up to 4.9.9’. This makes me wary – will it work with 5 and are there plans to update it? Thank you.

  20. ken doughty says

    Hiya,

    Thanks for recommending the Header and Footer plugin, and I have added code to just a single post only to prevent any issues.

    I’ve noticed though, that my dropdown menu has stopped showing (just on the page with code). Do you have a Javascript fix, please?

    http://www.phhsolicitors.co.uk/calc/

    Hope you can help.

    Merry Xmas!!!!

  21. Heather says

    I have added this to my site. It reads it just fine, but prints the code across the top of my header bar EVERY time! Not sure how to fix this.

  22. Kendra says

    Plsss explian in details how to add more than one code in the headers space, cos i have already inserted ,google search console code with the pluggin how am i going to add the adsene code in the same headers section

    • WPBeginner Support says

      You would add the new code on the next line as if you copied the entire code for each they should close themselves.

      Yönetici

  23. Yovann says

    How do I add a HTLM code in the header of my theme. I dont quite understand where it is. I use Xtheme and some people said to go to appearance and editor, but I dont have no editor.

    I need to add the Gtag in the heard of my website for Google analytics and I dont want to use a plug in

  24. mohamed ballouti says

    I want to ask you about this plugin.
    Can I put more than one code from different sites (eg Google Analytics code, Webmaster’s code, and Adsense ad code) Will the number of codes affects their performance because I see a difference in terms of visitors Google Analytics and WordPress analytics(WP Statistics)?
    And the difference between placing the code in the header and in the footer?
    Thank you sorry for bothering you
    I hope you will respond quickly.

  25. Gerardo says

    Hi, is it possible use this plugin to add more scripts? For example i need to add the AdSense and PushCrew codes.

    If possible, just copy the code one under the other?

    Thanks

  26. Tom S. says

    So far so good. I’ve been trying to search your site for code to insert line breaks and center text. Any urls to these explanations?

  27. Faith says

    Thank you so so much. That solved my problem. I would also love to know if there’s a way to solve the error code I get in my theme codes. I’ve got 53 error when I view the source code.

  28. Claire Plaisted says

    I wish this was available for Premium Accounts as well as Business. Is there another way to embed code in your site

  29. Mo says

    I’ve installed header and footer plugin, entered the relevant code and saved it. When I look in header script in header editor I can’t see the relevant code I’ve just entered. Please advise.
    Thank you.

  30. Randy Trelka says

    When I try to add header code using the plug in I get a 403 forbidden page. How do I get around this? I temporarily tried to turn off my security but that didn’t help.

  31. Prolete Atienza says

    Hi, Iam looking for option like this but for a multi-site,

    but I need is like a general admin for network-wide option,
    where when i config this, it will show to the header on all sub-site,

    currently, I need to set this for every sub-site plugin config.

    is there any way to have the plugin option of this menu under network option or something and not per sub-site.

    is there any other option i can use/do.

    thanks

  32. Riddhi says

    Hey, is there anyway to check if the code has been inserted ? Can’t detect it in my site source code nor in the headers.php file. Is is possible for this plugin to not be working ?

    • WPBeginner Support says

      Hi Riddhi,

      Once you add the code and save your changes you will be able to see the code in your site’s source code. For header code you will find it between <head> and </head> tags. Footer code will be added before the </body> tag.

      Yönetici

  33. Debbie says

    Is there a way to use this to add an image in the header that does not replace the existing header? In other words, I already have a logo there on the left, and a search bar with social media links on the right. The center is empty. I want to add an image widget which links to the source page of the image. I have the widget code ready to insert, but there is no HTML showing in the header.php file. I do not know PHP (i do know HTML quite well).
    I added the widget to the footer, which was easy because in my theme there IS HTML (an HTML table) in the footer. But it is supposed to be at the top of the pages.

  34. Jesse says

    Thank you so much for information. I have been so much problem with pasting html adsense code in header. This information helps me a lot

  35. Gareth Parmar says

    So, can I disable this notification after install anywhere?
    I don’t need all my multisite clients to see this notification!!

  36. Brandon says

    When I add my code into the header or footer section in the plugin, does it apply it across all my pages? Thanks.

  37. melody says

    hi, I just re-added my footer widget embedded code, it’s from keyreply.
    I don’t know what’s went wrong, I could see my footer widget from my pc(while I am logged in WP), however any other devices(pc or mobile phone), the widget is not showing. any ideas?

  38. Wendy K says

    I installed the insert headers and footers plugin on my clients WordPress site but when I click on it under settings it just shows a blank page. There are no fields available for me to insert text into.

  39. Geraldinesmythe says

    Hi,
    I’m trying to install an html5 banner ad at the top of my home page and a few other page tops. I have a customer that wants to only deliver their banner ad in that format so that as a rotating banner each image links to a different url we’re promoting. Where do I put this code to make it show up? I’ve tried downloading some plugins to place it but nothing is working. We normally just accept jpgs and links but I don’t want to lose this sale as she won’t deliver other than in html5. Thanks for your help! Geraldine

  40. Gareth says

    Hi, I love the simplicity of this plugin. There is one annoying point however.

    How can I disable the dashboard notice “Thank you for installing….” in a multisite set up.

    I don’t need all my client sites seeing that notice.

    A solution that doesn’t involve another plugin would be appreciated, preferably I can just remove an action or something.

Bir Cevap Bırakın

Yorum bırakmayı seçtiğiniz için teşekkür ederiz. Lütfen tüm yorumların yorum poli̇ti̇kasi uyarınca denetlendiğini ve e-posta adresinizin yayımlanmayacağını unutmayın. Ad alanında anahtar kelime KULLANMAYIN. Kişisel ve anlamlı bir sohbet edelim.