How to Easily Add Custom Code in WordPress (Without Breaking Your Site!)

Поделиться
HTML-код
  • Опубликовано: 14 дек 2024

Комментарии • 34

  • @wpbeginner
    @wpbeginner  Год назад

    ✅ Checkout WPCode Here 👉🏼wpcode.com/

  • @Theartofunity
    @Theartofunity 2 года назад +1

    Thanks for the info. I'm trying to figure out where to put the schema codes for the website home page. Can the header for this plugin be used for that? For articles, I'm just putting it in the text file of the blog at the bottom and didn't know if I should put it on the home page like that. thank you.

    • @wpbeginner
      @wpbeginner  2 года назад

      For adding schema markup we would first recommend an SEO plugin like All in One SEO to make it easier.
      Schema markup is normally something done throughout the article itself and not only in specific areas in the footer and header.

  • @sinister_ri
    @sinister_ri 9 месяцев назад

    This was the perfect tutorial to help me figure out what I needed to do. Thank you so much!

    • @wpbeginner
      @wpbeginner  9 месяцев назад

      You're welcome, glad our guide was helpful!

  • @michaeldinelli112
    @michaeldinelli112 Год назад +2

    Thanks for your excellent video. However, I'm unclear as to how to add custom code to a specific WordPress page using WPCode. I want to add a custom Google GA4 code to a specific page between the head tags, right after the Google tag.

    • @wpbeginner
      @wpbeginner  Год назад

      You would want to use the smart conditional logic to add the code if the URL is the page you are wanting to add it to :)

  • @happylifestore
    @happylifestore Год назад

    Thanks for the information. I want to put a code snippet on a specific point at the product page. But I see for that I need the pro version? I don't understand how you can let it "run everywhere". I want to place in banner on the productpage. Or is it so that"if I choose "run everywhere" the program automatically finds the right spot?

    • @wpbeginner
      @wpbeginner  Год назад

      If you want it on every single page of your site then that would be in the global section for where it would appear. If you wanted to specifically target ecommerce then you are correct and that would require the pro version :)

    • @happylifestore
      @happylifestore Год назад

      @@wpbeginner Allright, thanks for your answer. Than I am going to find out first if it is worth it.

  • @randbaldwin
    @randbaldwin 2 года назад +1

    I've been using the "code snippets" plugin. Do you have any comments about how they compare?

    • @wpbeginner
      @wpbeginner  2 года назад

      That would heavily depend on the code being used for how it would compare, we would recommend trying a staging site or something similar to test the differences :)
      www.wpbeginner.com/wp-tutorials/how-to-create-staging-environment-for-a-wordpress-site/

    • @fabian5161
      @fabian5161 2 года назад

      of course ............also my first thoughts - code snippets pro costs money - will see...........

  • @МарияЕршова-и1р
    @МарияЕршова-и1р Год назад

    Thank you! You solved my issue!

    • @wpbeginner
      @wpbeginner  Год назад

      You're welcome, glad our video was helpful!

  • @darkhorse447
    @darkhorse447 Год назад

    You saved my life! :)

  • @AleLGB
    @AleLGB Год назад

    I don't have the "Run Anywhere" option available, I left Sitewide Header but nothing works, even shortcode doesn't... The code I used is fully working when I try to manually insert it into the custom HTML code block. What should I do???

    • @wpbeginner
      @wpbeginner  Год назад

      It would depend on the specific code you are looking to add. If it is something visual like a shortcode then you wouldn't want to try adding it to the header as the header is normally for code like Google Analytics or a Facebook pixel.

  • @gotem370
    @gotem370 Год назад

    great video!

  • @QuranStoriesinEgypt
    @QuranStoriesinEgypt 2 года назад

    thank you it's very good important tool🙌

  • @moonraker2114
    @moonraker2114 2 года назад

    My nerdy friend, thanks for this one, you're the best. By the way, you look super duper cool today. Stay well.👍✌💖

    • @wpbeginner
      @wpbeginner  2 года назад

      Glad you like our video and presenter :)

  • @samueladdison7180
    @samueladdison7180 2 года назад

    Thanks for video, hope codes can also be imported too

    • @wpbeginner
      @wpbeginner  2 года назад +1

      It would depend on the code but moving code to the plugin should be relatively simple :)

  • @JacanaProductions
    @JacanaProductions Год назад

    On a serious note, every time I have to add a plug-in in wordpress I get a little nervous - are they mining my data somehow, how secure is it, who own the company who built the plugin etc and let's not get started about speed and the fact it is now loaded on every single page of ones website. I dunno, the more I use WP the more I see why people are using other newer platforms - not that its ease of use is not a plus though.

    • @wpbeginner
      @wpbeginner  Год назад

      Thank you for sharing your concerns, we would recommend using plugins from the WordPress.org repository to avoid shady plugins. :)

  • @Queraprender-ne7ep
    @Queraprender-ne7ep 9 месяцев назад

    Thanks for portuguese language translation ;-)

  • @malaikaishfaq2717
    @malaikaishfaq2717 Год назад

    how can i add all html css and js in one snippet

    • @wpbeginner
      @wpbeginner  Год назад

      Sadly with how that code interacts you would not be able to at the moment.