UPDATE: I have decided to remove the two typing features from the links below. I decided that I had too many typing features on my site. You should also note that the latest version of this plugin requires version 2.0.15. So you would want to download the latest script:
wp_enqueue_script( 'bb-typed-core', esc_url('https://unpkg.com/[email protected]/dist/typed.umd.js'), array(), true );
This article is a follow up to my original article about how to add a typing feature. I’ll discuss the new ways I add a typing feature on my homepage and my themes page. You can still download the core plugin from my github page.
Download my plugin from my github repository. Unzip it, then open the file until you find the file named big-typing-effect (all lower case). If the file name has been post fixed with anything such as “-main”, then you should delete it so that it just reads “big-typing-effect”. Go into your WordPress file directory and add the big-typing-effect folder into your plugins folder (wordpress > wp-content > plugins). Then go into your WordPress admin center (Plugins > Installed Plugins) and activate the plugin.
This implementation is distinct from my original post and the ReadMe instructions because it no longer relies on breaks. Instead it relies on minimum height. This should make it easier to implement and update.
The typing feature inside the cover block on my themes page was comparatively simple to implement. This is the custom HTML for the text on my themes page:
<p class="has-text-align-left has-white-color has-text-color has-x-large-font-size bb-coverType">The Big Themes series are designed for <span class="bb-text-slider-items">beginners., learners., developers., everyone!</span><strong class="bb-text-slider" style="font-weight:normal;"></strong></p>
I also set the minimum height of the cover block to 600 using the block editor. This was necessary so that the screen height didn’t adjust on mobile.
I also added the following additional CSS to complement the image:
.bb-coverType {
max-width: 400px !important;
}
However, you may decide that your cover block doesn’t need it.
Adding a typing feature to a media and text block is a bit more tricky. You will probably have to experiment with different minimum heights based on your content. This site’s homepage is implemented using the following custom HTML:
<p>The Big Themes Series can be used to create a website for a <span class="bb-text-slider-items">blog., restaurant., nonprofit., band., bar., portfolio., business., gym., park.</span><strong class="bb-text-slider" style="font-weight:normal;"></strong></p>
And it relies on the following additonal CSS:
/*These first two are necessary because it is custom html.*/
@media screen and (min-width: 600px) {
.bb-four-images-text .wp-block-media-text .wp-block-media-text__content {
padding-right: 20px;
}
}
/*You could also adjust this in the html inline*/
.bb-four-images-text .wp-block-media-text p {
font-size: 24px !important;
}
/* These last two keep the screen size from adjusting when the typing runs over onto a second line. You will likely have to experiment and adjust based on your content. */
@media screen and (max-width: 1000px) {
.bb-four-images-text .wp-block-media-text .wp-block-media-text__content p {
min-height: 120px;
}
}
@media screen and (max-width: 375px) {
.bb-four-images-text .wp-block-media-text .wp-block-media-text__content p {
min-height: 150px;
}
}
If you have any questions, then feel free to post them in the comments section.