Where To Add Custom Code In Divi (CSS, Javascript & PHP)

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

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

  • @videodavideo
    @videodavideo 3 года назад +1

    One of the better 'css in divi' vids I've found. I'd really like to see- and have yet to find any articles, posts, vids on it- is an even deeper dive into the core functionality of how divi processes, aggregates, and outputs builder & custom css.. Even more so now with the recent dynamic/critical css features added. Including topics like.. Divi's class naming conventions & hierarchy.. where x css is output vs where set.. And related to the theme options/performance|builder settings.. Tips on where to put what to minimize unstyled flash and CLS. And so on.
    I tend to do alot of custom css various places and forget where I put it.. I'll often add a fake rule like '.find_me_at_x' at the start of custom css to point me there.
    Rant- I wish Divi had an 'advanced mode' that enabled things like, showing 'all' the default style values of builder UI elements, and/or displayed the actual css being generated in real time while tweaking style controls, in a floating panel. How useful that'd be!

  • @dieterkaps8896
    @dieterkaps8896 3 года назад +1

    Wow - that was exactly what I was looking for for a long time. Great work! Thank You!

  • @victoralvarez5952
    @victoralvarez5952 4 года назад +3

    thanks dude, it's just what I was looking for c:

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

    Hi Nelson, where would be the best place to insert schema markup per page? then a code module is the best place for this. however if I need to insert an ahreflang attribute where would I best do this. sorry if this question is completely outside of your video and doesn't fit into it.

  • @micheleriley8985
    @micheleriley8985 3 года назад

    Can you help, I have the Divi theme on Wordpress. I am supposed to place the JavaScript on the php footer however when I test the link it’s gives a failed installation. Thanks In advance.😀

  • @tomkasparoff8688
    @tomkasparoff8688 4 года назад +1

    Amazing video. But I have a question. I have “boot strap” script, which allows to embed the widget in a existing website as “pop over”. So I added the script "onclick button". But the code does not run in DIVI. Is it possible to solve this problem?

    • @PeeAyeCreative
      @PeeAyeCreative  4 года назад

      Hi Tom, there could be lots of factors here. Without more context I'm not sure what to say.

    • @tomkasparoff8688
      @tomkasparoff8688 4 года назад

      @@PeeAyeCreative My task to add, to use a framework like j​query t​o bind click­events. Is it possible to add a snippet for a button module? Thanks in advance

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

    Hello Nelson, I am facing some issues.
    1st. when I put the code in style.css it's is not working. I am using your child theme.
    2nd. When I put the css code which you have provided here, in [built-in CSS editor] one desktop and mobile view hover over text looks center but on tab view it is on left and appear very small. Help please. thanks

  • @sonareclipse9810
    @sonareclipse9810 4 года назад +1

    These videos are SO helpful! If using Theme Options (inc CSS selectors on Advanced tabs), will that code be preserved if DIVI is updated?

    • @PeeAyeCreative
      @PeeAyeCreative  4 года назад

      Thank you, I'm glad! Yes, the CSS will be fine. There are some benefits to use a child theme like I believe in order for the CSS to be cached it needs to be in a child theme.

  • @blackarchiteck4226
    @blackarchiteck4226 4 года назад

    Great stuff, and thank you I appreciate you explain it and why. Best video yet!!

    • @PeeAyeCreative
      @PeeAyeCreative  4 года назад

      I appreciate that! So happy to hear this is helpful!

  • @avviano
    @avviano 3 года назад

    I was hoping some mention of code pen and how to integrate those into Divi. Especially more complex ones. Maybe a good topic for a future tutorial?

    • @PeeAyeCreative
      @PeeAyeCreative  3 года назад

      That's certainly a different topic, and very complex. Every one would be different. But I've shown where to place JS and CSS so technically, what did I miss?

  • @TamerZiady
    @TamerZiady 4 года назад

    Great tutorial. Thank you for sharing. In trying to use specificity; is there a way to add code just to a specific Divi Theme Builder Template? Trying to add WooCommerce Flex Slider to specific posts?

    • @PeeAyeCreative
      @PeeAyeCreative  4 года назад

      Hi Tamer, yes that would be the same as "Page Settings" so you can add it there in the template.

  • @MyGodTube
    @MyGodTube 3 года назад

    What do you think about using "Code Snippets" plugin in order to place php code and avoiding the child theme?

    • @PeeAyeCreative
      @PeeAyeCreative  3 года назад

      That should be fine, I don't use it but I heard of it before.

    • @nojomomma6191
      @nojomomma6191 3 года назад

      @@PeeAyeCreative was going to ask this same question. I have found Code Snippet and wondered if that is a safer option than Divi Theme Options for CSS and JS. Already lost my entire site from a bug in Divi (they receoved it but not totally!) so I don't want to lose all the CSS work I have done either. Your videos are great and very detailed. Thank you!

  • @lenshiker
    @lenshiker 4 года назад

    howdy! i wanna put a script from paypal smart button into my divi site. when i use the code module the smart button is not shown. if you got any idea please reply. thank you!

    • @PeeAyeCreative
      @PeeAyeCreative  4 года назад

      I'm not sure, it could be the wrong type of code to be used in that context.

  • @iMakeMemes
    @iMakeMemes 4 года назад

    it takes forever to save the JS, i don't know whats the problem, it dont wanna be saved

    • @PeeAyeCreative
      @PeeAyeCreative  4 года назад

      You can check our other videos about solving hosting and server issues as it would not be related to the code or to Divi. Look up How to fix Divi and check our guide on some steps to take.

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

    Can I add React.js code into divi?

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

      The Divi Builder is React. Not sure what else you mean.

  • @SevenErhan
    @SevenErhan 4 года назад +1

    Thank you 🙏

  • @haroonahmad1416
    @haroonahmad1416 4 года назад

    How to use codepen codes with DIVI ?

    • @PeeAyeCreative
      @PeeAyeCreative  4 года назад

      Hi Haroon, I do plan to do something with this in the future, but for now take a look here: codepen.io/andytran/pen/jyEPyL

  • @saveoursundarban
    @saveoursundarban 3 года назад

    Please change the title and remove php . Don't confuse people as there is no info about php . you have just talked about css

    • @PeeAyeCreative
      @PeeAyeCreative  3 года назад

      Please don't tell me what to do, and please be accurate when you make statements from now on. You are clearly mistaken and have proved that you didn't watch the video.