EDITS.WS

Tag: wordpress

  • Performance improvements in WordPress 6.1: enhanced database peformance and more

    WordPress 6.1 – the last major release of 2022 – is finally here! This release is a step in the right direction for full-site editing, bringing various customization options and improvements to the content creation and site creation experience. We’ve covered some notable changes in this update, which you can check out here. This post is dedicated to exploring the performance enhancements coming to our favorite open-source platform.

    WordPress 6.1 is the collective effort of a massive team of developers and contributors. Jean Baptiste Audras – the Triage team lead – shared some amazing statistics about the contributions to this release. An impressive 800 people from at least 60 countries and 180 identified companies contributed to WordPress 6.1.

    At Yoast, we’re proud of the work we’ve put into making this release possible. Out of all companies that contributed to 6.1, Yoast takes the number 2 spot with 740 contributions made by 16 contributors. Sergey Biryukov – a member of our dedicated team of WordPress contributors – tops the list with a whopping 584 contributions! Not to mention Bluehost – a fellow company in Newfold Digital – also contributed greatly to this release with 150 contributions.

    Image courtesy of jeanbaptisteaudras.com

    The WordPress Core Performance Team has done some incredible work to make the platform faster in the 6.1 release. This team, comprising members from Google, 10up, XWP, and Yoast, was formed in 2021 to monitor, enhance, and promote performance in WordPress core and its surrounding ecosystem. Without them, these improvements wouldn’t have been possible.

    Performance improvements are always welcomed by the community. We all know the importance of good website performance for SEO – a fast site is more favorable to rank high in the SERP. That’s due to Google and other search engines rewarding sites that deliver a fast and smooth user experience. Of course, you need good content to rank. But among many quality results, any small performance improvements may prove to be significant.

    Let’s dive into some of the notable performance enhancements in WordPress 6.1!

    Huge improvements to WP_Query with caching additions

    The addition of caching to WP_Query is one of the most significant performance improvements in WordPress 6.1. Basically, every time a visitor requests a web page, their browser has to make a request to the web server asking for information. The server needs to respond to this request and retrieve data from a database (or multiple ones) to send back. By implementing caching to WP_Query, the next time another visitor requests that same page, the page’s data would be retrieved from the website’s cache instead of retrieving data directly from the database.

    These changes aim to reduce the number of database queries and make sites faster, especially when using persistent object caching like Redis or Memcached. That’s because the database query will not run again until caches are invalidated. With fewer database queries, your pages will load faster, thus providing a better user experience for visitors.

    This is a much anticipated and welcomed improvement for many, especially developers. Jonny Harris – the contributor who worked on this improvement – shared his excitement in a recent Tweet.

    Improvements to the REST API

    Another significant performance boost comes with improvements to the REST API. In short, these updates decrease the number of database queries that run on each REST API request, allowing your pages to load faster.

    For instance, WordPress introduces an improvement of the post controller in the REST API. When returning a post in a REST API response, the post controller would request linked data such as author, featured image, and text. Since these linked items are not primed (ready for use) in caches, it might mean that for each post in the REST API response, there would be data queries from separate databases: one for the author, one for the featured image, and another for the text.

    Instead, in WordPress 6.1, all the caches are primed in a single database query. That means that the post controller in the REST API can grab data from that single database query instead of requesting data from separate databases, resulting in fewer queries.

    Improvements to the Cache API

    The Cache API gets various improvements in this release. Most notably, several private cache priming functions are available for public use in this release. WordPress encourages plugin and theme authors to use these functions to improve the performance of their code by reducing the number of database queries, which improves the website’s load speed.

    Media improvements

    WordPress 6.1 will automatically add decoding="async" to image attributes. In simple terms, this function tells your visitor’s browser that it’s okay to load images a bit later in favor of other information and data. This results in the page loading the content much faster and also reduces page render time. This is a huge performance booster for any web page containing a lot of images. It’s also good to know that you can remove this function.

    Site health improvements

    WordPress 6.1 introduces two new Site Health checks for Persistent Object Cache and Page Cache.

    • Persistent Object Cache – This new check determines whether the site uses a persistent object cache or not and recommends it if it makes sense for the site. It also links to a support resource created for the check. A few filters have been included for hosting providers to provide more specific steps regarding their environment.
    • Full Page Cache – This new check determines whether the site is using a full page cache solution and if the response time is acceptable. It also adds a couple of filters for hosting companies to customize the response threshold and add their own cache headers to be detected.

    Improved compatibility with PHP 8x

    WordPress 6.1 receives important compatibility improvements with PHP 8.0 and 8.1. All of this is possible thanks to the incredible work of many developers, especially Juliette Reinders Folmer. A few of us Yoasters also contributed to this effort, namely Sergey Biryukov, Carolina, and Ari Stathopoulos!

    The 6.1 release has continued the code modernization efforts on updating WordPress core and unit test suite for PHP 8.0 and 8.1, as well as preparing for PHP 8.2. Version 8.2 of PHP is expected to be released on November 24, 2022. We can expect some significant changes coming in PHP 8.2, which could impact many themes and plugins.

    The big step forward in this release is that WordPress core unit tests now pass on PHP 8.1 and 8.2. While full compatibility with PHP 8.1 and 8.2 is still a work in progress, this should prevent new PHP issues from being introduced in WordPress core. All remaining known issues are deprecation notices.

    It’s good to note that a deprecation notice is not an error, but rather an indicator of where additional work is needed for compatibility before PHP 9 (i.e. when the notices become fatal errors). With a deprecation notice, the PHP code will continue to work and nothing is broken.

    Changes to the loading routine

    As of WordPress 6.1, the send_headers hook has been moved to slightly later in the WordPress loading routine. This is a ticket that our Sergey Biryukov worked on!

    When you request a page, the web server needs to send back some headers that contain technical information about the page like response status. This lacks flexibility because some functions wouldn’t work when headers are being sent. By moving send_headers to after WordPress parses the query, those functions now work properly. This change may affect plugin developers, making it easier for them to manage header.

    Performance enhancements in the editor

    Some optimizations were made to the block editor to avoid repetitive calls to filesystem and processing of block.json files. These changes should improve loading performance and benefit all WordPress sites. Ari Stathopoulos – another member of our WordPress core contributor team – was responsible for making this happen!

    Want to try out more performance improvements?

    The WordPress Core Performance team has created the Performance Lab plugin to give users early access to new performance modules they’re working on. Install it and you’ll be able to try out their latest developments yourself, see how they impact your site’s performance and share any feedback you have. If you’d like to be even more involved, you can also help out as a contributor! And if you’re interested in finding out more about the performance improvements in 6.1, don’t forget to check out this Performance Field Guide thread. It contains loads of useful information for developers!

    The post Performance improvements in WordPress 6.1: enhanced database peformance and more appeared first on Yoast.

  • WordPress 6.1: Enhancing the full-site editing experience

    Have you heard the news? WordPress 6.1 is out! Welcome to the third and last major WordPress release of 2022. This release continues to build, iterate and refine the full-site editing experience introduced in WordPress 5.9 earlier this year. It brings us new possibilities to easily change up the styling of our website, spice up our page design, and other improvements to our favorite open-source platform. Let’s take a closer look at what 6.1 brings to the table!

    This release is a step in the right direction for full-site editing. Full-site editing and block themes arrived to WordPress with the promise to put more control in the hand of users, allowing them to do more with creating and designing a website. Version 6.1 is on track to deliver this promise. We’re seeing a release that focuses quite heavily on providing customization options and enhancing the site-editing experience.

    WordPress 6.1 introduces more than 2,000 updates since the release of WordPress 6.0 in May 2022. All the gains, enhancements, and improvements from version 13.1 to 14.1 of the Gutenberg plugin were committed to core. Since we can’t possibly cover all the updates in a single article, we’ll focus on several notable changes instead.

    More control over your global style preset

    The global style interface was first introduced in WordPress 5.9 and received a lot of attention and praise. It allows you to easily switch up the look and feel of your website. In just a few clicks, you can change the color palette of your entire site or change the default font, size, and color of your text and links. WordPress 6.1 brings even more customization to the global style interface. You can now determine presets for:

    • The default appearance of typography for headings and buttons
    • The default colors of headings and buttons
    • The width of the main content area and block spacing in the global layout

    All of this is great for design consistency. And that’s not all. You can even configure the default appearance for specific blocks, which allows for even more creativity in designing websites. Let’s say you want texts in the ‘list’ block to always be in the color green, you can easily do that now.

    It’s good to note that the global style feature is only available on block themes, so you won’t see this option if you’re running a theme that doesn’t support full-site editing.

    The global style interface in WordPress 6.1

    Twenty Twenty-Three default theme: powerful style variations

    WordPress is determined to provide more design controls to users, which is reflected in the new Twenty Twenty-Three (TT3) default block theme. The new theme is designed to leverage all the new design tools introduced in 6.1. When you first install this theme, it may look a bit underwhelming with the default style, but there’s a lot more than meets the eye. 

    Going into customizing TT3, you’ll find that it actually comes with 10 style variations for you to play around with. These variations were selected from a wide range of entries from the community. What’s impressive is that each of these variations is totally distinct from one another. Each variation has its own color palette, typography, layout,…. and they all look amazing. 

    Previously, the default WordPress themes were a bit underwhelming when talking about their appearances. Many people would choose a third-party theme because they look better and offer more customization possibilities. TT3 may change that. The new 10 style variations may just satisfy the needs of many, especially bloggers and small website owners. Not to mention, this theme may set an example for other themes, paving the way for more style variations in non-default themes and making it a standard to have multiple variations.

    Image courtesy of WordPress.org

    Multiple enhancements in design tools

    The design tools in the post editor are getting lots of improvements and enhancements, allowing you to get finer control of your page’s design and layout. WordPress 6.1 also brings consistency to the availability of design tools for different blocks. And it’s good to know that you can also override any global settings with adjustments made in the design tools in the post editor.

    Dimension control in more blocks

    WordPress 6.1 brings dimension control to blocks like paragraph, list, table, and more. In the sidebar of the post editor, you’ll find a section called “dimensions” where you can leverage this new enhancement. Don’t forget to check the 3-dot menu to see if any settings are hidden. For instance, you can now control the padding of the paragraph and group block. For the column and gallery block, it’s possible to control the spacing between elements in these blocks.

    Border control improvements

    This release also adds border support for more blocks and allows users to adjust the top, bottom, left, and right border separately. For instance, when using the gallery block, you can determine the border and its radius for each image in the gallery. And you can add actual borders to images, which was unavailable previously.

    Featured image in cover block

    You can now easily add your featured image to the cover block, allowing you to conveniently use the featured image anywhere on a page. When you add a cover block, there will be an option in the toolbar that lets you grab the featured image.

    Visualizer for padding and spacing

    There’s a real-time visualizer to help users with adjusting dimensions. It conveniently shows you how changes affect your page layout as you’re making the change. Pretty handy for retaining layout and design consistency.

    Fluid typography

    Another design improvement coming in this release is fluid typography. This feature allows theme makers to configure text to automatically scale depending on the screen where it’s viewed. Of course, websites nowadays are responsive so text does scale and resize according to screen sizes. But the problem is that it only scales to specific screen sizes, so text on anything outside of those pre-determined sizes won’t scale properly.

    On the other hand, fluid typography lets you resize text smoothly to match any device’s width. However, this feature is opt-in, so it only works if theme makers decide to implement the feature. It also works on blocks that support typography control, of which list you can find here.

    New templates in the site editor

    With full-site editing, you get a new editing experience with the “site editor” instead of working with the theme customizer tool. In the site editor, you can create templates for various pages, including your homepage, single post, 404 page, and search result page. The template creation experience has been expanded in WordPress 6.1, allowing you to create custom templates to use on any type of post or page. In addition to that, you get finer control over some of the templates that you can create, including:

    • Post: You can choose to create a single template for all posts or for a specific one.
    • Page: You can now create a template for pages and determine which page will use this template.
    • Author: You can create a template to use for all authors or for a specific one.
    • Category: Similar to the post template, you can create a template for all categories or for a single category.
    The template creation experience in the site editor has been expanded

    Inner block editing capability

    Inner block editing is a new feature coming to the quote and list block. As the name suggests, it’s now much easier to separately edit elements within the quote and list block. This is a quality-of-life improvement, especially for those who often work with the list block.

    For instance, let’s say you want to move an entry up or down in your list. All you need to do is click on that entry, which prompts the toolbar to appear, and click on the arrow to move it up or down the list. Another way is to use the list view. Entries in a list block will also be displayed as separate elements in the list view instead of aggregated into a single element.

    Content-only block editing

    WordPress 6.1 introduces an experimental feature called content-only editing for blocks, patterns, and templates. When this feature is enabled, users can only change the content inside a group of blocks, patterns, or templates. The idea is to prevent users from accidentally breaking the page layout or changing the styles.

    At the time of this release, content-only editing is not accessible from the Visual editor interface. You would need to use the Code editor interface to enable it. You can do this by navigating to the 3-dot menu at the top right of your post editor and selecting “Code editor”. The next step is to set the  templateLock attribute to contentOnly like in our example below.

    You can enable the content-only editing feature in the code editor interface

    You’ll notice that when content-only editing is enabled on a group of blocks, the sidebar changes as well. You won’t see the usual controls but a list of blocks included in the group. You can select any of those blocks by clicking on the block in the editor or on the corresponding item in the sidebar. If you have the list view open, clicking on this group of blocks in the list view will prompt the toolbar to appear. Clicking on the “Modify” button will temporarily disable content-only editing and bring back all the design tools.

    Performance improvements to the WordPress platform

    This release brings some significant performance improvements and many smaller ones to the WordPress platform. More than 25 tickets were dedicated to making WordPress faster and more efficient. If you want to learn about these enhancements, we’ve written a dedicated post about the notable performance improvements in WordPress 6.1. Check it out!

    All in all, performance improvements are always welcomed by the community. They indicate that WordPress as a platform is getting faster and becoming more efficient, which is beneficial for SEO. Since search engines tend to favor fast websites with good user experience, the more efficient WordPress becomes, the more advantages WordPress sites have when competing for a spot in the SERPs.

    Other small improvements and enhancements

    Cross-device preference in the post editor

    In the sidebar of the post editor, you can select preferences for how your editor should look when you’re working in this environment. For example, some people like to focus on the block they’re working with, so they select the “spotlight mode” in the view setting. Unfortunately, these preferences are only saved locally in previous WordPress versions. A bit inconvenient for those who use multiple devices, if you ask us. WordPress 6.1 enables cross-device preferences so your settings are saved and you’ll have the same editing experience on other devices.

    Small changes and additions to the post editor

    The UI of the post editor gets a small update in this release. The following changes and additions won’t have a big impact on your workflow, but you might take some time to get used to them:

    • The Preview button becomes “View
    • There’s a new “time to read” feature in the “Details” section of the top bar
    • The previous “Status & Visibility” section is now “Summary
    • The new “Summary” section now contains the post’s URL, post format, and template

    Block parts to use in classic theme

    The post editor of WordPress 6.1 gets a new section called “Template parts”. Basically, you can create templates for parts of a page, export those templates, and use them in a classic theme. WordPress 6.1 lets you create template parts for the comment section, header, footer, post meta, and general templates that are not tied to any area.

    Though this new feature seems useful, it’s quite cumbersome in practice. You would need to do a bunch of things to make the template parts work on a classic theme. Should you want to test this feature out, you can find instructions and resources in this thread.

    Time to update your WordPress to get the latest features, improvements, and security updates! To ensure the update works as intended, make sure to test it on your staging site to see if there are any conflicts with your themes or plugins. Happy updating!

    The post WordPress 6.1: Enhancing the full-site editing experience appeared first on Yoast.

  • Creativo Review: Multipurpose WordPress Theme With 23+ Demos

    Creativo is a multipurpose WordPress theme with 23+ importable demo sites. Learn more in our hands-on Creativo theme review.

    The post “Creativo Review: Multipurpose WordPress Theme With 23+ Demos” first appeared on WP Mayor.

  • WordPress 6.1: What’s New in the New Major Release

    2022’s third major release of WordPress, version 6.1 ”Misha”, is finally here. It introduces over 400 core enhancements and bug fixes and various backport changes from Gutenberg to the core software.

    As this version is still a part of the Gutenberg project phase two, it features many block editor improvements, including backports from over 10 Gutenberg releases after WordPress 6.0. On top of that, it comes with the new Twenty Twenty-Three default theme.

    Let’s discuss the new updates for WordPress 6.1.

    New Twenty Twenty-Three Default Theme

    Following the Twenty Twenty-Two block theme released with WordPress 5.9, 6.1 introduces a new default block theme called Twenty Twenty-Three.

    The Twenty Twenty-Three default WordPress theme, with the global styles panel and the theme style options visible

    It comes with eleven theme styles from the get-go, allowing you to easily switch the color scheme and typography via the global styles switcher feature. Even if you don’t want to use pre-defined theme styles, the wide variety of options is a great starting point for customization.

    Another improvement in Twenty Twenty-Three is the typography. Not only do you get more font family options, but they are available across all eleven styles. This allows more freedom to mix and match the typography between styles.

    Expert Tip

    New users starting with an empty site will be offered the Twenty-Twenty-Three theme by default and can start customizing with the site editor. 

    The Twenty-Twenty-Three theme, with its style variations, the site editor, and the options to create templates for a single category and other archives, is quite suitable for content-heavy websites.

    The site editor might still be in beta, but it gives new users plenty of customization tools in a more coherent interface than a classic theme.

    Editor

    Birgit P.

    WordPress Developer Advocate

    Block Editor Improvements

    With over 10 Gutenberg releases merged into the WordPress 6.1 core, we can see plenty of block editor improvements in the new version. Let’s discuss the most significant updates featured with the WordPress 6.1 block editor.

    Improved Template Options

    6.1 comes with two new template options – Page and Single Item: Post. The new version also streamlines the template creation process by automatically adding relevant patterns, so you no longer have to start from scratch.

    For example, when you add the Single Item: Post template, it will start with block patterns that include post content, the comments query loop, and template parts such as the header and footer. From that point, you can start customizing the layout or design.

    The Single item Post template with pre-defined patterns

    Another improvement is that you can choose to add the template to all items or a specific one. For example, when adding an author template, you’ll be prompted to choose whether the template will apply to all authors or just one.

    A pop-up asking the user to select whether to apply the new template for all items or a specific one

    As such, you can create tailored templates for Author, Category, and Single Item: Post.

    In addition, there’s now the Custom template option allowing you to create a new template for any post or page. It will feature a pattern similar to the post template, but you can reconstruct it to suit whatever type of content.

    Improved Block Locking

    Block locking is a neat feature that ensures your content blocks won’t be accidentally deleted or moved. However, locking a nested block can take a lot of time as you have to lock all individual blocks one by one.

    WordPress 6.1 introduces a new improvement to this system, allowing you to apply block locking to all elements inside a group block. This option will appear on the block locking pop-up when you want to lock a group block. You’ll see the Apply to all blocks inside toggle switch.

    The Lock Group pop-up, with the Apply to all blocks inside option highlighted

    Expert Tip

    The locking mechanism for block patterns and inner blocks allows site owners and administrators to curate the editor experience for content creators and standardize designs using the settings from the theme.json file.

    Editor

    Birgit P.

    WordPress Developer Advocate

    Content-Only Editing

    WordPress 6.1 supports content-only editing for group, cover, and column blocks using the templateLock attribute. This lets you lock the content layout while writing, uploading images, or in any other way editing the content.

    Patterns allow practical use of content-only editing. If a pattern uses a group block to contain several blocks, add the templateLock attribute to the pattern’s code and set it to contentOnly.

    The pattern PHP code, with the templateLock attribute added to a group block

    With that pattern active on the block editor, the design tools will be removed from the sidebar panel. Instead, you will see a list of the content blocks in the group. The toolbar will also contain no block-moving tools after selecting a block. With the feature active, you can freely edit the actual content.

    A paragraph block with no block-moving tools on its toolbar, and the block settings panel showing the content list

    You can temporarily disable content-only editing by clicking Modify on the group block’s toolbar. When disabled, you can access all design and layout tools for the group block and its components. Click Done on the group block’s toolbar to enable content-only editing again.

    A group block with content-only editing enabled, showing the Modify button to temporarily disable content-only editing

    Updated Quote and List Blocks

    Quote and list blocks can now contain inner blocks for more content flexibility.

    The block inserter is now available in the quote block. You can use it to add any block in the quoted content by clicking the add block (+) icon or typing / in the quote block line.

    For example, you can use this improvement to add a heading block before writing the text below or to incorporate an image in the quote block.

    A quote block example, showing a list block inside it

    Multiple blocks inside the quote block allow you to easily rearrange the inner content. Use the block moving tools in the block toolbar to move a block up or down.

    The list block now treats the items as individual blocks, resulting in a nested block structure. This allows for a more streamlined workflow as you can rearrange or remove list items more easily.

    The improved list block uses a nested structure and treats the list items as individual blocks. The advantage is that you can rearrange or remove list items easily. The nested structure can also be seen from the block list view for easier bulk actions.

    A list block example with the expanded block editor list view, showing individual list item blocks

    The previous major WordPress release introduced featured image support to the cover block. However, users had to add an image and then replace it with the featured image using a button on the toolbar, resulting in an awkward workflow.

    WordPress 6.1 comes with the option to use the featured image when you add a cover block. This way, you can set up the cover block easier and faster.

    A cover block placeholder, with the use featured image option highlighted

    Design Tools Consistency

    Starting with WordPress 6.1, we’ll see improvements in design tools consistency for more customization using the block editor without custom CSS. This will allow users to find certain tools for a specific block easier.

    In 6.1, over 50 blocks have typography and color tools, over 40 have dimension tools, and 30 have all three. You can find a complete list of the design tools available for each block in the WordPress 6.1 Dev Notes.

    Expert Tip

    Contributors are working to bring most design tools to all blocks to ensure more consistency in the future. 

    Some design tools still need to be tested in different contexts and for different use cases and are only available for theme developers via the theme.json file. Once the feedback from that user group is incorporated into future updates, the design team will work on the user interface to bring the design tools to the site editor, allowing end users to customize their sites.

    Editor

    Birgit P.

    WordPress Developer Advocate

    Dimensions Settings Presets

    WordPress 6.1 adds a slider with seven presets for dimensions settings, such as block spacing and margin. This allows users to set a value quickly and apply the same value for other blocks easily.

    Block spacing tools with the sliding preset bar

    That said, there’s still a button to switch back to the old custom pixel field if you want to include custom values.

    Updated Preview Button

    The block editor’s Preview button is now labeled View, but it still functions similarly. It lets you choose between the editor’s desktop, tablet, and mobile views and open the preview in a new tab.

    The only significant difference is the new View site option in the site editor, which will open your site in a new tab. In the previous WordPress version, you had to manually type your URL in a new tab or go back to the dashboard to visit your site.

    The View button that will open the preview options

    Template Parts in Block Inserter

    Template parts are now available in the block inserter. This makes it easier to create or customize new templates as you can insert them in a few clicks. 

    Template part options in the block inserter

    Moreover, with the existing options to create template parts from existing blocks, this feature can open more possibilities to utilize custom template elements. 

    New Preference Option

    A new Always open list view option is available in the block editor preferences. To access it, click the Options button at the top-right corner of the editor and select Preferences.

    The preferences panel with the new always open list view option

    By enabling this option, the list view will be opened by default when you open the block editor.

    Updated Editor Details

    New metrics have been added to the editor Details menu. Now you can see the Time to read information along with the word and character counts. This way, you can better estimate how long the content you’re writing will be and the time it will take to read it.

    Block editor details panel, showing the content information, including the new time to read information

    Post Summary Update

    The Status & visibility section of the post editor is now called Summary. The post’s permalink and template settings are now within this section.

    Post summary section, showing the post URL and template option

    Theme Improvements

    WordPress 6.1 brings a lot of enhancements to theme customization, including the improved global styles panel and custom starter patterns. Let’s overview all the theme improvements in the latest version.

    Improved Global Styles

    There are some new additions to the global styles interface.

    The first one is the headings element that you can configure in the typography and color sections. In the previous version, headings followed the global text style, but in WordPress 6.1, you can make headings use different typography and colors throughout the website. This improves the workflow, as you no longer need to customize the heading blocks individually.

    The typography global styles panel with the new headings and buttons options

    The Buttons element is now also available in the typography and color. Similar to the headings element, you can now set different typography and colors for the button’s text and background.

    The colors global styles panel with the new headings and buttons options

    The next are the layout global styles. In the previous version, you could only change padding settings. WordPress 6.1 significantly improved on this by adding content area width and block spacing controls. The padding and block spacing controls also feature a slider with presets to simplify customization.

    The layout global styles panel with the content area configuration and more padding settings

    Starter Patterns for All Post Types

    Theme authors and users can set up starter patterns for all post types to provide pattern options when creating a new post. 

    This requires adding the patterns’ PHP files into the theme’s patterns folder. Such files contain code snippets that specify the pattern’s title and post type, followed by the pattern’s code.

    Note that the new Twenty Twenty-Three theme already has the patterns folder by default. You may have to create the folder if you use another block theme.

    For example, we can add a travel blog pattern from the WordPress pattern directory. First, we must create a PHP file called blog.php with the following code:

    <?php
     /**
      * Title: Travel Blog
      * Slug: twentytwentythree/travel-blog
      * Block Types: core/post-content
      * Post Types: post
      * Categories: featured, text
      */
    ?>

    You can change the title and categories to your liking. The next step involves copying and pasting the pattern from the pattern directory into the file using the Copy Pattern button. 

    The Travel Blog pattern page on the WordPress pattern directory, with the Copy Pattern button highlighted

    Paste the pattern on the blog.php file. Once done, the PHP file will look like this:

    The blog.php file containing the PHP script and the HTML code for the FAQ pattern

    Save the file and open your WordPress admin panel. To confirm that the pattern has been registered, navigate to Posts -> Add New to create a new post. You should see a pop-up with a selection of the registered patterns.

    The Choose a pattern pop-up that appears when adding a new post

    You can add as many starter patterns as you want. To add more, create another PHP file for the pattern and repeat the steps. 

    Expert Tip

    You can review the patterns bundled with a particular theme in the theme folder before deciding on an installation. Using a series of patterns helps any user to create a page rather quickly by just replacing text and images once the patterns are added to the canvas of the block editor.

    Editor

    Birgit P.

    WordPress Developer Advocate

    Fluid Typography

    WordPress 6.1 introduces fluid typography support via the theme.json file. It enhances responsiveness as the text size will automatically adjust based on the user’s viewport.

    To change the fluid typography settings in the theme.json file, include the fluid parameter in the settings.typography.fluid section. If you’re using an older block theme, it may have fluid typography disabled by default, but you can add the fluid parameter and set its value to true.

    {
    	"version": 2,
    	"settings": {
    		"typography": {
    			"fluid": true,
    		}
    	}
    }

    You can also disable fluid typography simply by setting the fluid value to false.

    {
    	"version": 2,
    	"settings": {
    		"typography": {
    			"fluid": false,
    		}
    	}
    }

    You can configure the size for fluid typography in the settings.typography.fontSizes section of the file. Here, you can set the minimum and maximum values for each font size and disable fluid typography for specific font sizes. 

    For example, you can set the fluid typography size for the Normal font size by setting the fluid parameter value to true and specifying the minimum and maximum values. Then, disable fluid typography for the Large font size by setting a false value for the fluid parameter.

    You can configure the text size for fluid typography in the settings.typography.fontSizes section.

    {
    	"version": 2,
    	"settings": {
    		"typography": {
    			"fluid": true,
    			"fontSizes": [
    				{
    					"name": "Normal",
    					"size": "1.125rem",
    					"fluid": {
    						"min": "1rem",
    						"max": "1.5rem"
    					},
    					"slug": "normal"
    				},
    				{
    					"name": "Large",
    					"size": "2rem",
    					"fluid": false,
    					"slug": "large"
    				}
    			]
    		}
    	}
    }

    Expert Tip

    Fluid typography lets users increase or decrease font sizes dynamically between screen sizes. For now, it requires modifying the theme.json file to use it, as there is no tool in the site editor that allows end users to control the settings.

    Editor

    Birgit P.

    WordPress Developer Advocate

    Block-Based Template Part Support for Classic Themes

    WordPress 6.1 also introduces the block-based template part support feature that expands classic theme usability with the block editor.

    Enabling this feature takes two steps. First, you must add template part support by adding the following function to the theme’s functions.php file:

    function add_block_template_part_support() {
        add_theme_support( 'block-template-parts' );
    }
    
    add_action( 'after_setup_theme', 'add_block_template_part_support' );

    You’ll see the Template Parts option in the dashboard’s Appearance menu.

    The Template Parts menu on the WordPress dashboard

    However, you’ll find no template parts options in the editor – you’ll have to add them manually by creating an HTML file in the parts folder within the theme’s root directory.

    For example, we’ll add a footer template part to the Twenty Twenty-One theme. Start by creating an HTML file with the path of /public_html/wp-content/themes/twentytwentyone/parts/footer.html.

    Paste the the following code snippet into the file:

    <!-- wp:group {"layout":{"inherit":true}} -->
    <div class="wp-block-group">
    	<!-- wp:group {"style":{"spacing":{"padding":{"top":"80px","bottom":"30px"}}}} -->
    	<div class="wp-block-group" style="padding-top:80px;padding-bottom:30px">
    		<!-- wp:paragraph {"align":"center"} -->
    		<p class="has-text-align-center">Proudly Powered by <a href="https://wordpress.org" rel="nofollow">WordPress</a></p>
    		<!-- /wp:paragraph -->
    	</div>
    	<!-- /wp:group -->
    </div>
    <!-- /wp:group -->

    Go back to the WordPress dashboard and navigate to Appearance -> Template Parts. You should see the footer template part is now available, and you can start editing it using the block editor.

    The Template Parts panel, showing the footer template part option

    You can add more HTML files in the parts folder to register more block-based template parts for the theme.

    Expert Tip

    When it comes to integrating classic themes with the block-based environment, WordPress 5.9 introduced the theme.json file that allows configuring blocks for classic themes, and WordPress 6.1 comes with the ability to use block-based template parts. 

    Both features are provided to the theme developers to offer their end users block-based customization in classic themes. It will be up to them to deliver the features to their users.

    Editor

    Birgit P.

    WordPress Developer Advocate

    Block Theme Filters

    Following the update to the WordPress theme repository, which features a new Block Themes filter, the WordPress dashboard has received a similar update.

    When you navigate to Appearance -> Themes -> Add New, you can see the Block Themes filter.

    The block themes filter in the WordPress add themes panel

    How to Update to WordPress 6.1

    Updating to WordPress 6.1 should only take a few minutes, and there are a few ways to do it easily. We recommend creating a backup and testing the new version in a staging environment before proceeding with the update on your main site.

    This way, you’ll be sure that the new version works perfectly with your website’s content, themes, and plugins. 

    Once you’re ready to proceed, choose one of the following ways to update WordPress:

    • WordPress dashboard – go to the update page by navigating to Dashboard -> Updates or clicking the Please update now button on the top banner. Once you’re in the update page, click Update to version 6.1.
    • hPanel – navigate to WordPress -> Dashboard and click Update to 6.1 on the WordPress version section in the bottom right corner. Note that this method is only possible for users of Hostinger’s WordPress, Shared, and Cloud hosting plans.
    • Manual update – download the WordPress 6.1 files from WordPress.org. Extract the .zip file and delete the wp-content folder and wp-config-sample.php file. Then, use an FTP client or a file manager to overwrite the WordPress core files and folders, excluding the wp-content folder and wp-config-sample.php file.
    • WordPress command-line interface (WP-CLI) – use SSH to access your website’s public_html root directory and run the wp core update command to perform the update.

    Conclusion

    WordPress 6.1 adds more enhancements to the block editor to simplify the workflow and introduce additional customization, such as an improved global styles panel and block locking features. The new version also comes with a new default theme and more options available in the theme.json file.

    Update your site to WordPress 6.1 if you haven’t done so already. This way, you’ll benefit from the new features and protect yourself from potential vulnerabilities. Remember to back up your site and use a staging environment to test the latest version beforehand.

    The post WordPress 6.1: What’s New in the New Major Release appeared first on Hostinger Blog.

  • Comparing the Best WordPress Image Editors

    In this article, I’ll compare two leading image editing plugins and show you which I think is the best WordPress image editor.

    The post “Comparing the Best WordPress Image Editors” first appeared on WP Mayor.

  • 10 Real One Page Website Examples to Inspire Your Own Design

    Sometimes, one page is all you need to promote your business. A large or complex website may be unnecessary, especially if you run a startup or offer a single service or product. Some one page website examples can show you how to implement a more streamlined approach. With that in mind, we’ve compiled a list of visually appealing and effective single-page websites you can learn from. By reviewing these real-life examples, you’ll be better prepared to design a site that effectively communicates all the most important information in one place.

    The post 10 Real One Page Website Examples to Inspire Your Own Design appeared first on ThemeIsle Blog.

  • 10 Best Call-to-Action Plugins for WordPress

    The right call to action (CTA) plugin can be one of the best marketing tools for your WordPress site. These days, it takes a lot to engage users to take action on a website. Simply throwing a button on a page probably won’t get the results you are looking for. With a WordPress call-to-action plugin, you can power your website with CTAs that actually work. In this post, we’ll discuss our picks for the best call-to-action plugins for WordPress. Let’s get started.

    What is a Call to Action?

    At its core, a call to action is a request designed to encourage a user to complete an action on a website. There are many ways to incorporate a call to action in WordPress. It can be as simple as a “buy now” button, a social sharing icon, or an email opt-in form optimized for lead generation. CTAs can also notify visitors of upcoming sales and/or provide discount codes incentivizing them to make a purchase. Through all the ways to incorporate a CTA, it’s important to keep a few things in mind. CTA’s should stand out (or popup if necessary) and they should be easily accessible and relevant to what your site’s visitors are seeking.

    Why Use a WordPress Call to Action Plugin?

    A call to action plugin can supercharge your CTAs in powerful ways. They are designed to be marketing tools with advanced functionality that make your CTAs more engaging. The best CTA WordPress plugins have features that allow you to automate CTAs and deploy them site-wide based on conditions you control. For example, you may want a CTA to pop up when a user attempts to exit a page or you may want to show the same CTA at the end of all your posts. Trying to create CTAs like this without a plugin would be difficult to say the least.

    The 10 Best Call to Action Plugins for WordPress

    There are dozens of great call to action plugins for WordPress on the market. For this post, we’ve taken the time to research them and provide you with our top ten picks. Some of the plugins listed here are free, while others require a fee for a monthly or yearly license. Each has its merits and uses based on the type of call to action you wish to incorporate into your website. Let’s get to it.

    1. Bloom (Email Opt-in)

    Bloom call to action plugin

    Bloom is a full-featured email opt-in plugin that gives you the ability to create beautiful opt-ins for your website in just a few clicks. You can choose from more than 100 design options and configurations for your opt-in, as well as custom styles for its elements. You can add images, custom text, style the button, and more. Additionally, there are six display types including pop-up, fly-in, in-line, below content, widget area, and gated content, which allow you to choose how and where you want your opt-in to display.

    Bloom email opt-in types

    As an added bonus, you can set automatic triggers for your opt-in forms. Having this option is useful for displaying content at certain times, locations, or after purchases on your posts or pages. Bloom integrates with 19 email marketing providers such as Mailchimp, Hubspot, Constant Contact, Active Campaign, and more. Plus, you can manage all of your email opt-in CTAs in one place with a powerful dashboard with built-in A/B testing and analytics.

    Key Features for Bloom

    • Highly customizable opt-in forms in a few clicks
    • Multiple placement options
    • Integration with most major email providers
    • Automatic triggers including timed delay, after scrolling, after commenting, after inactivity, bottom of post, and after purchases
    • Fully responsive
    • A/B testing to increase conversions
    • 24/7 Support
    • Unlimited website usage

    Bloom is for you if…

    …you want to create email opt-in forms with ease, have seamless integration with your email provider, and be able to target specific posts or pages.

    Price: Free with an Elegant Themes subscription.

    2. Monarch (Social Sharing)

    Monarch social sharing

    Monarch is a social sharing plugin that gives you the ability to add social sharing buttons on your website. Buttons can be placed in a floating sidebar, above or below content, on images & video, on automatic fly-ins, or on a pop-up.

    Monarch locations

    In addition to the ability to choose a location for your social sharing buttons, you have a choice of 6 automatic pop-up and fly-in triggers. You can place icons at the bottom of a post, on a timed delay, after commenting, on scroll, after a purchase, or after inactivity. There are over 35 social networks to choose from including Twitter, Pinterest, Reddit, YouTube, LinkedIn, and Instagram, amongst others.

    monarch dashboard

    Setting your networks up is an easy process. You just need to provide the URL of your chosen network, and Monarch will display the network icons for you, then pull your follow counts in dynamically. Integrating Monarch into your site can be accomplished with a shortcode, or by placing them into a widget.

    Key Features for Monarch

    • Setup is a breeze
    • Highly customizable display settings
    • Check statistics in a easy-to-navigate dashboard
    • Import and export data
    • Over 35 social networks supported
    • 5 location choices
    • Multiple display options
    • 24/7 Support
    • Unlimited website usage

    Monarch is for you if…

    …you want a highly customizable option for displaying your social media networks. Monarch is easy to set up, and provides a great way to get your message out to the masses. With so many customization options, you can integrate social media networks to match your branding, and drop them just about anywhere you wish.

    Price: Free with an Elegant Themes subscription.

    3. Convert Pro

    Convert pro call to action plugin WordPress

    Convert Pro is a call to action plugin for WordPress that uses a drag and drop interface. You have the option of creating several types of CTA’s including pop-ups, email forms, inline, slide-ins, info bars, full screen pop-ups and more. Convert Pro is cloud-based, so it won’t slow your site down. Additionally, you can create a CTA on the fly with a pre-made template.

    Convert Pro CTA types

    Both standard and growth bundle options offer nearly 40 integrations with some of the leading email providers such as AWeber, SendinBlue, MailerLite, and HubSpot. Convert Pro also offers a responsive CTA creator, as well as triggers for exit intent, timing, user inactivity, and more.

    Key Features for Convert Pro

    • Drag and drop editor
    • Google Analytics integration
    • Several pop-up styles
    • Full screen CTA’s
    • Page level targeting
    • A/B Testing
    • Unlimited Website usage
    • Risk-free guarantee
    • Premium support

    You should use Convert Pro if…

    …you like using a drag and drop editor, want the ability to have multi-step pop-ups, and don’t mind renewing your license annually.

    Price: $87 per year for standard license | $187 per year for the growth bundle | Learn more about Convert Pro

    4. WP Notification Bar Pro

    WP Notification Bar Pro

    WP Notification Bar Pro is a WordPress plugin designed to add custom notifcation bars to your WordPress site. There are a number of options available to embed forms, social media feeds, social icons, videos, searches, and more.

    Customizating WP Notification Bar Pro is simple and allow for unlimited color choices. You can also choose the width of your bar, fonts, font sizes, line height, and more. Feed options are pretty nice, too. You can feature multiple notifications on one bar. When displaying posts, you can create a post feed complete with thumbnails.

    You can set several different conditions for your notifications, too. You can specify which page to display your notifications, as well as logged in status. There are also responsive visibility options, which is good for mobile users.

    WP Notification Bar Pro

    Key Features for WP Notification Bar Pro

    • Unlimited site usage
    • 24/7 support
    • Video tutorials
    • 30 day money back guarantee
    • Unlimited color choices
    • 100% responsive
    • Import/export capability
    • Demo content
    • A/B testing
    • Track clicks and views

    You should use WP Notification Bar Pro if…

    …you don’t need to create elaborate pop-ups and want to save valuable page real estate. It’s also useful for creating post notifications in a feed type interface.

    Price: $19 per year | Learn more about WP Notification Bar Pro

    5. Simple Side Tab

    simple side tab

    The Simple Side Tab call to action plugin is one of the most basic plugins on our list. Settings are minimal, but still allow for text, URL, hover, and color options to be configured. Users have a choice between left and right side placement for their CTA.

    simple side tab WordPress plugin settings

    A great feature of Simple Side Tab is it’s ability to serve as a global call to action. The tab is sticky, too, so it will always be visible to your site’s visitors no matter where they are on the site.

    Key Features for Simple Side Tab

    • Customizable with CSS
    • Light plugin, won’t bloat your website
    • Unlimited color options
    • Left or right side placement
    • 7 font choices
    • Sticky for constant visibility

    You should use Simple Side Tab if…

    …you want an easy way to create a global call to action that won’t load your site down.

    Price: Free | Learn more about Simple Side Tab

    6. Ultimate Blocks

    Ultimate blocks plugin

    The Ultimate Blocks plugin for Gutenberg has over 20 modules to create engaging CTA’s for your website. While not a typical call to action plugin, Ultimate Blocks has several modules that you can use to create them. There’s a call to action module, along with click to Tweet, social share, and a button module that can all serve as great ways to engage your user base.

    All of the modules in Ultimate Blocks have styling options including color, text, spacing, and border options.

    Ultimate blocks CTA modules

    Key Features for Ultimate Blocks

    • 20 Content modules
    • Highly customizable
    • Multiple call to action modules

    You should use Ultimate Blocks if…

    …you want options to build great call to action content without breaking the bank.

    Price: Free | Learn more about Ultimate Blocks

    7. Mail Optin

    Mail Optin call to action plugin WordPress

    The Mail Optin plugin is a lead generation, email automation, and newsletter plugin for WordPress. Mail Optin provides multiple display options including a lightbox pop-up, slide-in, notification bar, sidebar widget, or inline. Additionally, you can configure your call to action to appear before, in the middle, or after your content.

    As far as customization options go, Mail Optin uses a familiar interface – the WordPress Customizer panel. This makes customizing forms a breeze. There are multiple visual and sound effects, along with triggers to engage your audience.

    Mail optin customizer settings

    Mail Optin’s integrations are plentiful, allowing for seamless linking to email providers, CRM’s, and a number of analytics software providers such as HubSpot, Mailchimp, SendinBlue, Gravity Forms, and much more.

    Key Features for Mail Optin

    • Multiple display types
    • Several location options
    • Familiar interface
    • Exit-intent technology
    • Custom user registration forms
    • A/B testing
    • Gated content options
    • Google Analytics integration
    • Lead generation reports
    • Sound & display effects
    • Multiple trigger options
    • Targeting options

    You should use Mail Optin if…

    …you want unlimited capabilities, integrations and features in one software. Plus, if you’re accustomed to the WordPress customizer, you’ll be right at home here.

    Price: Starts at $79 per year | Learn more about Mail Optin

    8. Hello Bar

    Hello Bar

    The Hello Bar plugin is a call to action plugin for WordPress that allows you to add a hello bar to your site with advanced targeting and customization capabilities. CTA’s are built using Hello Bar’s web interface that you connect to your WordPress website with a snippet. There are multiple display types included with Hello Bar including modals, full screen pop-ups, bars, and alert sliders. Also, there are hundreds of pre-made themes to help you build your CTA’s. You can style your own, plus Hello Bar detects your site’s design to match your site styles.

    Hello Bar customizations

    The targeting features included with Hello Bar give you the ability to target site visitors by location, campaign, source, and more. Additionally, you can schedule messaging and offers by time, date, and omit those who have already visited your site.

    Key Features for Hello Bar

    • 100’s of pre-made templates
    • Match your site’s design, colors, and fonts automatically
    • Highly customizable visual editor
    • Multiple targeting options
    • Custom reports and analytics
    • A/B testing

    You should use Hello Bar if…

    …you want lots of design choices, easy setup, and advanced targeting capabilities.

    Price: Free to $99 per month | Learn more about Hello Bar

    9. OptinMonster

    Optin Monster WordPress plugin

    The Optin Monster call to action plugin is a lightweight, yet robust WordPress plugin that delivers on several fronts. With over 1 million downloads, Optin Monster is one of the more popular entries on our list. Display types include lighbox pop-ups, floating notification bars, inline forms, scroll boxes, and fullscreen overlays. You can design your forms with their drag and drop interface with lots of customization options, or choose one of 300 templates available.

    Optin Monster templates

    Optin Monster boasts basic integration with providers such as Mailchimp, Constant Contact, and SendinBlue to name a few. Additionally, you have several targeting options such as page level targeting, time on site, and scroll tracking. You can have unlimited subscribers, but page views are limited to 2,500 with the lowest pricing tier.

    Key Features for OptinMonster

    • Multiple display types
    • Page level targeting
    • Exit intent detection
    • Drag and drop builder
    • Display conditions
    • A/B testing
    • Analytics
    • List segmentation
    • Subscriber recognition & management
    • Conditional redirects
    • OnSite Retargeting and Personalization

    You should use Optin Monster if…

    …you require a full-featured solution that will allow you to segment your subscriber lists, have advanced targeting, advanced analytics, and lots of helpful tutorials to assist you along the way.

    Price: $9 to $49 per month | Learn more about Optin Monster

    10. Thrive Leads

    Thrive Leads

    The Thrive Leads stand-alone WordPress plugin is an email and lead generation tool by the makers of the Thrive theme. Thrive leads comes with more than 100 templates in which to build your call to action form. You can also use Thrive’s drag and drop builder to create a custom form of your choosing. There are lots of display types including pop-up lightbox, sticky notification bar, 2-step opt-in forms, slide-ins, and more. You can also create yes/no and multiple choice forms, which is something that is unique on our list.

    Thrive Leads form builder

    Thrive Leads offers advanced targeting which helps you deliver highly targeted offers based on categories, posts, tags, and more. You’ll also be able to conduct A/B testing, and gain actionable insights on your forms through detailed reports. Lastly, you can hide forms or show different ones to your existing subscribers with the help of Thrive’s SmartLinks & SmartExit technology.

    Key Features for Thrive Leads

    • Unlimited leads
    • Focus on lead optimization
    • A/B Testing
    • Drag and drop edtior
    • Advanced targeting capabilities
    • Actionable reporting & insights
    • Hide or Reveal offers based on subscriber status

    You should use Thrive Leads if…

    …you want stand-alone WordPress solution with advanced targeting capabilities, multiple options for displaying your opt-ins, and excellent reporting tools.

    Price: $97 per year | Learn more about Thrive Leads

    Final Thoughts on Call to Action Plugins for WordPress

    Several of our entries share similar features, but each plugin truly is unique. The one you choose depends on your situation and what you are comfortable with paying. While we do mention some free options on our list, the more feature rich options do require a subscription.

    Which call to action plugin do you use for WordPress? Sound off in the comments below.

    The post 10 Best Call-to-Action Plugins for WordPress appeared first on Elegant Themes Blog.

  • How to Create a Table of Contents in WordPress

    A Table of Contents in WordPress can be an effective addition to your website pages or posts. They are great for boosting user experience and for navigating long-form copy. Plus, they provide a slight advantage in SEO.

    In this article, we’ll show you step-by-step how to add a table of contents to your WordPress site easily with a plugin. And, we’ll show you the simple steps needed to create one from scratch. So, if you’re here for a table of contents for WordPress, this post has what you need.

    Here’s what we’ll cover:

    What is a Table of Contents in WordPress?

    A WordPress table of contents is basically a list of the main headings or topics covered throughout the content of a page or post. They are great for giving users an overview of what’s to come. Typically, they are placed at the top of a page, just after the title or introductory paragraph.

    Examples

    Usually, a table of contents consists of a list of anchor links (or jump links) to the corresponding headings on the page. When clicked, anchor links jump or scroll down to the corresponding heading where the content will be found. This makes it easy for visitors to navigate the page.

    The Benefits of Creating a Table of Contents in WordPress?

    If you’re a business owner or blogger using WordPress, user experience and search engine optimization(SEO) are always going to be important. Using a WordPress table of contents on your site can help with both.

    User Experience

    A table of contents can be extremely beneficial to user experience. It allows visitors to quickly and easily orient themselves to the information available in the content.

    Plus, because they contain anchor links, visitors can easily jump to the information they are looking for without so much scrolling. This can save a lot of time when there is a lot of content. We even use them on our Elegant Themes Blog for long guides such as ultimate guide to Divi Speed Optimization.

    SEO Value

    Having a table of contents can give your page a boost on SERPs by giving you an enriched search result. This can include additional links to your most popular page sections featured directly on your search result.

    Google Search Result

    Plus, they help search engines understand the crawling context of your page which can lead to improved indexing or featured snippets. By creating well-organized content with a table of contents, you give Google and other search engines a clear understanding of your content.

    How to Automatically Add a Table of Contents in WordPress Using a Plugin

    Creating a table of contents in WordPress using a plugin is by far the easiest way to go. And there are no shortage of plugins in the WordPress repository that help create an site-wide Table of Contents for your posts and pages and generate anchor links automatically.

    Automatic TOC WordPress Plugins

    For this post, we’ll be using Easy Table of Contents WordPress plugin to create a our table of contents.

    1. Install and Activate the Plugin

    To get started, go to your WordPress dashboard and navigate to Plugin > Add New. Search for the Easy Table of Contents plugin and click to install and activate it.

    install easy table of contents plugin

    2. Check a Post to See It Working

    Once you install and activate the plugin, Easy Table of Contents immediately creates a table of contents section on your posts. As soon as it is activated on your site, you can navigate to the front end and see the table it created on your posts.

    Live Post Example

    3. Customize Your Table of Contents Site-Wide Settings

    After seeing what the plugin does out of the box, you can visit the plugin’s settings and tailor them to your needs. To go to the settings, navigate to Settings > Table of Contents.

    Site-wide settings

    For most people, enabling the table of contents to show up on posts is probably all you’ll need. Pages are a different story. If you have landing pages that are specifically designed as top-level pages, you should uncheck showing a table of contents on your pages (keep posts checked).

    Easy Table of Contents Settings

    Further, you’ll see that Easy TOC recognizes all your custom post types and various templates which you can toggle on/off for.

    There are also a host of other options for you to try out, but that is all dependent on your website and needs. Most websites will only need to use H2, H3, or H4 headings in their table of contents. Too many items in a table of contents will clutter up your content and be less helpful than not having a table of contents at all.

    4. Override Site-Wide Settings for Individual Posts

    Aside from the site-wide settings, Easy Table of Contents gives you post-by-post control over the table of contents. However, to enable Easy Table of Contents individual post settings in the Block Editor, you have to enable Custom Fields in the block editor’s preferences section.

    To do this click on the Gear Icon in the top right to see Page Settings. Of those settings, click on “Preferences”.

    This will open up a modal in the center of your screen. Click on the “Panels” tab. Then, Toggle on the “Custom Fields” option. This will allow any plugin or theme setting that adds custom fields to your pages/posts to display those settings underneath the block editor.

    enable custom fields

    You can disable the table of contents from showing up on the posts page and adjust other settings that only affect that one page. This is perfect for special use cases that differ from your site-wide settings.

    To disable the Table of Contents section from a particular post/page, scroll down to the plugin settings (after you’ve enabled custom fields).

    Checkmark the box for “Disable the automatic insertion of the table of contents.”

    This removes the table of contents that would automatically be inserted via plugin settings.

    Disable TOC on Page or Post

    That’s it!

    Other Table of Contents Plugins for WordPress

    Aside from Easy Table of Contents, there are plenty of other Table of Contents plugins that could serve you well. There are some great free plugins like LuckyWP Table of Contents that work great with WordPress blocks and page builders like Divi. And there are premium plugins like Fixed TOC that have all the advanced features one would need. Do your research and test a few out to get the best features that fit your needs.

    In general, look for the ones that are easy to use out of the box, have built-in support for schema markup, and have decent styling options. Here are the best Table of Contents plugins for WordPress that we recommend.

    How to Create a Table of Contents in WordPress Manually

    Creating a table of contents from scratch using the WordPress Editor can be useful for users who only need one for a few posts or pages and don’t need the site-wide functionality of a plugin. And creating one is fairly simple (and kinda fun) once you understand the concept.

    A table of contents is basically a list of anchor links that jump to specified sections or headings of a page. So, if you’ve created an anchor link on a page or in a navigation menu before, you are already familiar with the basics of creating a table of contents. If your not familiar with anchor links (or jump links), we have a complete guide on how to create anchor links in WordPress.

    Here’s how to create a table of contents from scratch on a WordPress post:

    1. Create Your List of Headings for Your Table of Contents

    At the top of your page or post, create a list of all the headings for your table of contents using a paragraph block (or list block). To do this, create a new paragraph block (or list block) and add the heading text that corresponds to the headings on your page content below. Make sure there is a line break after each heading text.

    Create Table of Contents - Block Editor - Create Paragraph Block

    Once done, make sure to check that the heading text in the table of contents matches the heading text in the content for a better user experience.

    2. Add a Unique HTML Anchor ID to Each Heading on Your Page or Post

    Next, go through the content on your page (heading by heading) and assign each heading a unique HTML anchor ID.

    To do this, go to a heading block and click on its settings.

    Create Table of Contents - Block Editor - Steps 2-4

    After that, in the heading block settings (in the “Advanced” tab of the heading block), add an HTML Anchor ID to the field. For this example, the anchor HTML anchor is “heading-one”. This anchor ID will be used as the anchor link target.

    Create Table of Contents - Block Editor - Steps 5-6

    3. Convert Each Heading in Your Table of Contents Into an Anchor Link

    Once the ID for the heading element is set, we can go back up to our paragraph or list block that contains our table of contents. One by one, highlight each line and click the “Link” icon to add a link.

    Create Table of Contents - Block Editor - Steps 7-8

    Instead of a web address, add a pound sign or hashtag (#) plus our anchor ID. Press enter and the link will apply to that text.

    Create Table of Contents - Block Editor - Step 9

    For our example, we added “#heading-one” for our anchor link. Your anchor link text should be descriptive but concise. But it should also accurately summarize the content that is within that section so search engines can read it.

    Most importantly, your anchor link needs to be unique and not used elsewhere on the page. This is because using the same HTML Anchor ID will confuse the browser and not work as intended.

    Once you are done, save your changes and preview your page. Test your new Table of Contents by clicking the anchor links to make sure they are all jumping to the right places. If those links aren’t working, you may have left out or misplaced the “#” or your Anchor IDs and Anchor Link URLs aren’t an exact match.

    Creating a Table of Contents in Divi

    Divi Theme Builder is one of the most robust and easy-to-use tools for WordPress websites. It allows website creators, business owners, and marketers to create stunning websites that are feature rich.

    Using the default WordPress editor to create a table of contents is pretty limiting, especially when it comes to design. Divi makes it so much easier to create unique table of contents designs and add smooth scrolling anchor links to any element on the page or post without having to know HTML or CSS.

    Create a Table of Contents in Divi Theme Builder

    We have a full write-up for how to build out a Table of Contents section for your blog. Not only can you find the how-to steps, but there is also a free layout download for you. The layout is for you if you’re looking for a faster solution with the Divi Theme.

    The Best Divi Table of Contents Plugin

    If you are looking for a way to create a table of contents in Divi, check the Divi Table of Contents Maker plugin.

    divi table of contents maker plugin

    This plugin includes a unique Table of Contents Module for Divi that automatically generates your lists, anchor links, and all the functionality you need in a few clicks. You can use the module on a theme builder template to add table of contents automatically for all your blog posts! Plus the module has hundreds of customization settings and style options.

    Learn more about Divi Table of Contents Maker.

    Other Table of Contents Solutions to Consider

    If you are interested in other solutions for adding a table of contents in WordPress, here are some others that you may not be aware of that are worth considering.

    Wait for a Built-In Table of Contents Block in WordPress Core

    If you have time to wait for a table of Contents solution, it seems a Table of Contents WordPress block is in the works. And, there is a lot of recent traction on the project that you can view on the Github Pull and in an issues dialogue. It looks like a promising block that will bring table of contents natively into WordPress’ block editor.

    However, there are bumps in the roadmap so it is a toss-up whether or not it will make WordPress 6.1 or be in a later release.

    Check for a Table of Contents Feature in Plugins You May Already Use

    With all the robust plugins out there. Who knows? There is a decent chance that maybe you’re using a plugin currently that has a table of contents feature hidden in the details. Here are a couple of popular plugins you may already use that offer the ability to create a table of contents in WordPress.

    SEO Yoast Premium

    If you’re using the Yoast SEO plugin for WordPress, you may be wondering what the Table of Contents block is and how it can help you. The Table of Contents block is a premium feature that allows you to dynamically create a table of contents for your post or page. The best part is that if you already use Yoast SEO Premium, you have an easy TOC solution.

    Spectra

    Another plugin many people use is Spectra. Spectra has been gaining popularity as an enhancement of the built-in block editor for WordPress.

    One of the blocks included in Spectra is an easy to use Table of Contents block. The block has full design customizability and is deployable with no additional coding. As you can see, add the block to your post and adjust the settings. You’ll have a table of contents in a few seconds. Spectra does come in a free and premium version.

    Conclusion

    In conclusion, creating a table of contents in WordPress is easy and can be done in a few steps. By using a plugin, you can automatically generate a table of contents for your pages and post. Or, you can manually create a table of contents in the default WordPress editor or in a page builder like Divi for more design settings. Either way, you have the power to customize your website to afford your site visitors a better user experience and be seen better in search results.

    Do you use a table of contents on your WordPress site? Do you have a favorite plugin you use? Let us know in the comments!

    Featured Image via IconArt / shutterstock.com

    The post How to Create a Table of Contents in WordPress appeared first on Elegant Themes Blog.

  • Infinite Scroll in WordPress: How to Add It to Your Website

    Infinite scroll ensures that your pages automatically load new content every time a visitor reaches the bottom of a page. In this post, we will show you how to add infinite scroll to your WordPress website.

    The post Infinite Scroll in WordPress: How to Add It to Your Website appeared first on ThemeIsle Blog.

  • How to Start an Online Magazine With WordPress (In 5 Steps)

    Are you wondering how to start an online magazine? Fortunately, WordPress can simplify the process for you. Using the right tools, you can create a digital publication that your audience will be able to enjoy both online and offline.

    The post How to Start an Online Magazine With WordPress (In 5 Steps) appeared first on ThemeIsle Blog.