Create A Staging Site With This Plugin

The host we use for our e-commerce site has a built-in method for cloning a site to a sub-domain. So I will start by saying that I have not used this WP-Staging plugin. I came across it in a question and answer on the WooCommerce support site, where Support suggested it.

That said, the plugin has got almost 2,000 five-star reviews, which is a pretty good indicator of its worth.

There’s a pro version for pushing from the staging site to a live site. If someone was in the business of managing other people’s sites, then it would be worth looking at.

Local Fonts

A court in Germany fined a website owner for using Google fonts because they show the IP address of the visitor, in breach of GDPR. People are looking to host fonts locally.

GeneratePress has this Adding Local Fonts page in the documentation on how to pull down Google fonts and host them locally using this tool – google-webfonts-helper (now relocated – (so use this link to google webfonts helper) that identifies the files for Google fonts.

I have already done this on the e-commerce site and I am working my way through other sites. That said, in WP 6.2 it looks as though WP will incorporate some method of doing this without having to add custom CSS and without having to temporarily add php code to the functions file to allow uploading .woff and .woff2 files.

The code one needs to add to the functions file is to allow uploading .woff files, which to protect against malicious code being injected, are normally not allowed.

WP Tavern has a couple of articles on local fonts, and suggests Bunny Fonts as a plugin as an easier way to replace Google fonts. I read the documentation for Bunny Fonts and it seemed just as straightforward to use the GeneratePress method. And there is every reason to think that the same GeneratePress method would work on any theme, not that I have tried it. And it would work with any web font that one might buy and download.

Multiple h1 Tags On A Page

Multiple h1 tags on a page are bad, I thought. And I would have left it at that except for something I didn’t want to do. I didn’t want to mess about isolating the h1 font that displays over a hero image just to get it to render at the size I wanted. And I didn’t want to change the h1 font size globally because it fits in neatly in the hierarchy of sizes h2, h3, etc. that I have on the site.

So I decided to look up something I took at immutable fact. That is, namely, that multiple h1 tags on a page are bad.

You can have as many h2, h3, etc tags on a page as you like as long as they are nested in order, but you should only have one big h1 to control the page. That is what I thought.

John Mueller from Google

I googled and I found a video on YouTube that John Mueller from Google did in December 2017. He was answering a question raised by someone who had more that one set of h1 tags or his page and wondered how Google viewed that.

Mueller said that provided the h1 tags made sense to highlights different parts of a page, then having them on a page are just fine.

All of which goes to show that it is worthwhile going back and revisiting facts one thinks one knows, to check whether they are still facts.

Sending It On Home To WordPres Dot Com

I have a website at WordPress dot com, and I am signed up to receive email updates on the latest developments.

I just received an email headed ‘Import Your WordPress Site to WordPress.com — Including Themes and Plugins’ that says

“WordPress.com customers can now copy over everything from a self-hosted WordPress site — including themes and plugins — and create a carbon copy on WordPress.com. You’ll be able to enjoy all the features of your existing site, plus the benefits of our fast, secure hosting with tons of features, and our world-class customer service.”

The advantage of hosting a site on WordPress dot come is that Automattic (the company that owns WordPress dot com) looks after security.

Non Clickable Menu Items

Non clickable menu items are useful when you don’t want people clicking them. So, you may ask, in what circumstances might you not want people clicking on them?

Well it can be where you have products in categories and you want people to look at the products within the categories. What you don’t want them to do is click on the superior menu item and see all the products in all the categories, like some giant never-ending display.

On one of my other sites I have a main menu and sub-menus for some of the main menu items. And those sub-menu items have sub-sub-menu items.

I want visitors to click on the sub-sub-menu items. I don’t want visitors clicking on the main menu item, and I don’t want them clicking on the sub-menu items.

The way to make menu items non clickable is to use a custom link. When you use a custom link you see a link field and a name. What you do is, instead of putting a URL in the link field, you put a symbol such as a hash sign #.

You have to put something: WordPress won’t let you leave the URL field empty.

So far so good and I have done that several times before. The thing is that if you leave the # in place, WordPress will read that as a link back to the home page, followed by /#.

And that is not what you want. You want the link to be a non-link. That is, you want it to do nothing at all. You don’t want the cursor to change to a little hand. You want nothing, nada.

The extra step that I learned today is that once the custom link is made, take out the # sign. Now the link is dead and the menu item is no longer clickable.

Jetpack and Yoast Plugin Conflict?

I wondered today whether I had a Jetpack and Yoast plugin conflict.

The site I am talking about is running WP 5.3.2 and I noticed today when writing a post that Gutenberg was not creating a text block automatically when I did a carriage return. I had to put the cursor on a new line to trigger Gutenberg.

Then I noticed that the Yoast SEO (Version 12.8.1) fields were not opening. I thought there may be a plugin conflict, and my first thought was in might be Jetpack. Sure enough, when I disabled Jetpack (Version 8.1) that solved the Yoast issue. I have been running Jetpack (and Yoast) for a long time, and this issue was new to me.

That said, I had to reinstall Yoast SEO because I was getting a warning that Yoast would not work with earlier WP versions – as though it did not recognise that I was on the most up-to-date version of WP.

I reinstalled WP just in case.

After reinstalling Yoast it now recognised that it was working with the most up-to-date version of WP, so that was one problem solved.

CSS and Javascript minify settings

I cleared caches (Litespeed cache) and reset the CSS and Javascript minify settings and cleared caches and optimised again.

Despite doing that I still got the problem that Yoast fields wouldn’t show unless the Jetpack plugin was disabled.

I looked in the Jetpack plugin Support forum to see whether there were reports of a Jetpack and Yoast plugin conflict. There was nothing there so I searched some other forum posts that I googled.

Reinstalling Jetpack and Yoast Plugins

There was a discussion about an issue that related to Jetpack (nothing to do with the Yoast plugin), and someone mentioned reinstalling Jetpack.

I had already reinstalled the Yoast plugin and I thought that reinstalling the Jetpack plugin shouldn’t affect anything. But I did it anyway and bingo!, I could see the Yoast fields were displaying properly.

So what is the moral of this tale? Was it the minify options I had set in Litespeed? Was it a corrupted or partial plugin update at some point?

I guess I will never know, but I saved myself chasing the problem endlessly by reinstalling the plugins.