• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

WordPress: Classic PHP Themes vs Block Themes

Community Expert ,
Mar 09, 2023 Mar 09, 2023

Copy link to clipboard

Copied

WordPress Theme developers are probably already familiar with Classic PHP Themes. But there's a new kid on the block, Block Themes (sorry, no pun intended 😏).

 

Benefits of Block Themes

Block themes improve scalability and performance.

  • Block themes enhance loading performance by loading styles only for rendered blocks on a page.
  • Block themes are not required to manually enqueue stylesheets for both front-end and editors.
  • Theme.json handles all aspects of add_theme_support().
  • Accessibility features such as Skip to content, keyboard navigation, and landmarks are generated automatically without adding additional code.
  • With a block theme, the user can edit ALL parts of their website without code.
  • By using the Styles interface, users can customize colors and typography for the website and for the blocks

 

In a standard HTML file, you would include an HTML tag, <head> and <body>.
In block themes, these HTML elements are added for you. Necessary PHP hooks that you would add to a classic theme, including wp_head(), wp_body_open(), and wp_footer(), are also added automatically. The markup that is inside the template file is printed between the opening and closing body tags.

 

Differences & Similarities between Classic PHP Themes & Block Themes (see chart below).

https://developer.wordpress.org/themes/block-themes/#differences-and-similarities-between-classic-th...

 

What is a Theme JSON?

Theme.json is a configuration file for theme styles and block settings.  Theme.json can be added to ANY theme.  It works with both classic PHP-based themes as well as block themes. However Theme.json does not work with the classic editor.

https://developer.wordpress.org/themes/advanced-topics/theme-json/

 

Creating New Themes with Full Site Editing (FSE only works with Block Themes)

https://developer.wordpress.org/themes/block-themes/creating-new-themes-using-the-site-editor/

 

Block Themes may not be everyone's cup of tea so WordPress will continue supporting Classic PHP Themes.  But if you're looking for full site editing, faster performance or a streamlined site without baked-in widgets,  Block Themes could be your golden ticket.

Astra  - https://wpastra.com/

Neve - https://themeisle.com/themes/neve/

Ultra - https://themify.me/themes/ultra/

 

Nancy O'Shea— Product User, Community Expert & Moderator
TOPICS
Code , How to , Other , Performance , Server side applications

Views

315

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 10, 2023 Mar 10, 2023

Copy link to clipboard

Copied

LATEST

yes .. WP is .json 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines