WordPress Classic Theme vs Block Theme Development, 5 reasons to invest in block theme development!

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

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

  • @geofflayland1566
    @geofflayland1566 2 месяца назад +1

    Very helpful for a non WP geek

  • @HullioGQ
    @HullioGQ 26 дней назад +1

    Thanks for the tutorials, Elliott! By the way, do you foresee WordPress eventually moving away from PHP and MySQL altogether? It seems like they’re constantly evolving the block editor, and while PHP and MySQL have been the foundation for years, could we see a transition to something faster, more scalable, or better suited for the demands of today's websites?

    • @elliottrichmondwp
      @elliottrichmondwp  24 дня назад +1

      PHP and MySQL still remain foundational to WordPress core. The Block and Site Editors are extensions designed to leverage modern technologies like React, before the Block Editor surfaces or renders information to the user, PHP and MySQL are still doing the heavy lifting in the background 😉
      This is probably the one thing I love about WordPress and that is that it can evolve like this to use different tech 👍

  • @Mafiakitty
    @Mafiakitty 5 месяцев назад +2

    Block themes for the win!

  • @visualmodo
    @visualmodo 5 месяцев назад +1

    Really good video, thanks!

  • @SitWithAnkit
    @SitWithAnkit 5 месяцев назад +2

    I can't remove underline from links on hover in block themes. No option provided by default. Need to write custom CSS for this basic behavior change. Any suggestions?

    • @elliottrichmondwp
      @elliottrichmondwp  5 месяцев назад +1

      Yeah sure, in the Site Editor, you can go to Global Styles > Typography > Links then set the Decoration to None, this will set all the link decorations for the whole site though, if you want to target a specific block you'll need to use something like wp_enqueue_block_style on the action "after_setup_theme" or something similar.

  • @olga_lc
    @olga_lc 5 месяцев назад +1

    Hi! What about websites with complex layouts, a lot of custom css and javascript, external libraries etc.? Do people make them with blocks and fse?
    I am pretty new to Wordpress and currently use classic theme with ACF for that type of projects. Is it worth to explore block theme in this case?

    • @elliottrichmondwp
      @elliottrichmondwp  4 месяца назад +1

      Absolutely, my suggestion would be: if you have a low-functionality, low-traffic personal site, why not convert it to a block theme to see how you get on? Choose something that you won't get too hung up on, just to dip your toe in. That's what I did. Anything more complex will require adding custom code, so try to keep it simple to start with. Don't stress yourself with a fully functional client site build until you are completely comfortable with FSE. Hope that helps 👍

    • @olga_lc
      @olga_lc 4 месяца назад +1

      ​@@elliottrichmondwpthanks for the answer!
      My problem with block themes is that I haven't found a good guide or starter template for custom development.
      Like if you look at classic theme files, you can see the logic behind it. But with block themes, the code and the project structure is so unintuitive that I don't even know where to start, not saying about making styles consistent, scaling the project etc.
      I have tried making custom blocks with React, but it looks like an overhead comparing to classic theme, unless you want to make a reusable theme or plugin for sale.
      My next stop will be Acf blocks, as there have been some good reviews about this workflow, hopefully it works out😅

  • @timnashcouk
    @timnashcouk 5 месяцев назад +2

    #2 is a dubious claim, especially if you don't export the theme output and it's stored in the Database, the number of database requests would be significanltly higher, then a WordPress site with no plugins and just the standard loop.
    In both cases the actual content is being rendered by PHP, so all the parts regarding them being more "performant" or "secure" is very much as dependent on what you have on your site in terms of plugins etc as any theme would be. It being a block theme has no true impact on performance, you not using rubbish plugins for things, making lots of remote calls and enqueuing a bunch of stuff absouletely does.
    But you could have gotten to the same place with any other theme, the block editor makes it easier to reach. But isn't the inherent cause!
    Where the performance is, is against things like shortcodes, which are processed out at render time, which is how many page builders worked, and assuming you are not using the shortcode block you should see the great results.
    TLDR; Performance will vary, is way more nuanced and #2 security comments is mostly wishful thinking :D

    • @elliottrichmondwp
      @elliottrichmondwp  5 месяцев назад

      You can’t inject a php script at top of a .html template 😬 that makes it more secure in my opinion, granted you probably can in a pattern file but as a developer you make that choice to use .php or not 🤓

    • @timnashcouk
      @timnashcouk 5 месяцев назад

      @@elliottrichmondwp Those HTML files are included into PHP and rendered back out. Are you convinced that PHP inside couldn't be injected? Don't rely on a file extension for security!

    • @timnashcouk
      @timnashcouk 5 месяцев назад +2

      But even if we accepted your argument, that hasn't improved anything other then the bad actor injects somewhere else. If they can access the theme, its almost certain they can inject anywhere else.
      If anything injecting into the theme is harder then a plugin.
      I'm pro our block future, I like the fact theme developers are not going to have to learn PHP.
      That would have been the big security win from my perspective , taking function away from design meaning a designer doesn't have to be a PHP developer, learn a load of code and introduce security issues via copy and paste.

    • @elliottrichmondwp
      @elliottrichmondwp  5 месяцев назад

      I would disagree but I’m not saying core is more secure, I’m saying the Block Theme is, wouldn’t you agree?

    • @timnashcouk
      @timnashcouk 5 месяцев назад +2

      ​@@elliottrichmondwp What you actually said was Block theme is mostly made of HTML meaning there is less processing on the server thus improving security.
      Block themes are mostly made up of HTML ✅ - Totally and this is fantastic thank you for highlighting this, I actually think people don't realise blocks (and block themes) render down to HTML.
      Meaning there is less processing ❌ - It's a different type of processing, but that HTML in a block theme html file is processed just like the old PHP files were and acted on, and attacks are still possible within them, the browser doesn't load the files in your theme, WordPress does.
      thus improving security ❌ - Other aspects do but the reduced processing statement is wrong and thus doesn't improve security
      Are block themes more secure?
      🤷sort off!
      The best thing about block themes from a security point of view are they are simple, they are single purpose, they have separated concerns.
      They will make things better, and a site using blocks themes will have a better security posture going forward.
      - Stopping theme devs being well devs is a huge win!
      - Getting stuff out of functions.php brilliant
      - Getting code out of themes (Which I think was your intended point) is good, themes should just do design (non block themes can do this, but block themes make this a feature, not something you have to fight to acheieve)
      So if you *had* said block themes are more secure I would have been onboard.

  • @rayediaz
    @rayediaz 5 месяцев назад +4

    Block themes are not ready yet.

    • @elliottrichmondwp
      @elliottrichmondwp  5 месяцев назад +1

      Can you add some context, not ready for what?

  • @Black1991Star
    @Black1991Star 5 месяцев назад +4

    I can give you 20 reasons of why the block theme is bad.😂 Turn off JS on your browser and you will see your site like it see robots.

    • @elliottrichmondwp
      @elliottrichmondwp  5 месяцев назад +1

      Well that’s 1, how about the other 19 🤔😂
      If you’re expecting user to switch JS off then you probably should stick to traditional print media rather than having a website 😬

    • @timnashcouk
      @timnashcouk 5 месяцев назад +3

      Blocks on the front end render to HTML, so the bots see the HTML just like your non-block theme. Only if the theme is meant to have some sort of Javascript functionality would it render with Javascript. If anything compared to a lot of other "page builders" blocks are generally doing a better job of mininimizing Javascript on the front end. Now the admin experience you might have a point, but then with the classic editor you still had JS in the editing page.

    • @Black1991Star
      @Black1991Star 5 месяцев назад

      @@elliottrichmondwp I don't care about traditional print media, but I do care about SEO and Google rankings. Any SPA will be faster than a website on blocking WP, but in order for it to be properly indexed, you will have to do double work with SSR... sooo

    • @elliottrichmondwp
      @elliottrichmondwp  5 месяцев назад

      ​@@Black1991Star I sense there's a possibility for us to veer off the main topic. Originally, my video aimed to explore the nuances between Classic and Block Theme Development, highlighting their respective benefits. However, for the sake of fostering engagement, could you elaborate on your assertion regarding the SEO indexing of a WordPress site utilising a Block Theme? I've been a WordPress user for quite some time, and I can't recall encountering such an issue unless I've consciously configured specific authentication protocols or implemented blockers in my robots.txt file. Clearly a single page application is always going to be easier to fully crawl over a framework that has a large amount of content, you use the tools for the purpose of the goals :)

    • @ivanbarta2821
      @ivanbarta2821 5 месяцев назад +1

      For example, I still don't know how to make responsivity for blocks for different break points...