Jim
Forum Replies Created
-
Forum: Themes and Templates
In reply to: [GeneratePress] Google fonts slowing load time?Thanks @ejcabquina, but that didn’t quite work. It does cause the browser to switch between using system fonts when narrow to Open Sans when wide, but Open Sans google fonts gets downloaded for mobile as well as desktop (PageSpeed Insights shows it as render blocking for both).
Of course I had to set Customize > Typography > body to Google’s Open Sans, otherwise it wouldn’t be there for desktop. The rest were set to inherit.
If as Tom says, the font request can’t be conditioned on a media query, maybe there’s no way to download the fonts for one and not the other.
Forum: Themes and Templates
In reply to: [GeneratePress] Google fonts slowing load time?OK, sorry to drag this out. I will try something like that, but isn’t it backwards? If on mobile, I want to use the system font stack rather than google fonts.
Forum: Themes and Templates
In reply to: [GeneratePress] Google fonts slowing load time?Thanks Tom! Last year someone asked about using system stack for mobile and a google font for desktop. You said sure, and asked a question he never replied to, so you never got to the answer.
I’d like to try that in a way that won’t mess up GeneratePress. Mobile seems to be more impacted by using Google fonts.
So would I set the customizer to the system stack, and then do something like this in styles.css?
@media only screen and (min-width: 980px) { @font-face { font-family: "Open Sans"; src: url(https://fonts.googleapis.com/css?family=Open+Sans:300,regular,italic,700&display=swap); font-weight: normal; font-style: normal; } body { font-family: "Open Sans"; } }I have a pretty strong feeling this isn’t right, but wanted to at least try something.
Forum: Themes and Templates
In reply to: [GeneratePress] Google fonts slowing load time?As an experiment, I tried switching to the System Font Stack for body in the customizer. It makes a huge difference, in PageSpeed Insights getting scores all in the 90s on mobile and high 90s-100 on desktop. I can’t believe downloading a few font files makes such a huge difference. It must require more processing in the client than equivalent file size of an image.
It doesn’t look quite as nice this way, and I don’t know what it looks like on other platforms, so I would still like to find a fast way to use Google’s Open Sans – self-hosting didn’t even help really.
Forum: Themes and Templates
In reply to: [GeneratePress] Google fonts slowing load time?Not to beat a dead horse, but I did find that I was only using a few of the weights and styles of the font, so I deleted the rest in the Customizer. That didn’t make any difference to PageSpeed Insights, still render blocking 780 ms.
Then I followed the steps to self-host the fonts in the link you gave,
https://docs.generatepress.com/article/adding-local-fonts/
It’s nice because you can limit languages as well as weights.But after all that, PageSpeed Insights still says the fonts are causing about the same delay. Now they are no longer render-blocking, but it says they should be pre-loaded. So I undid all the self-hosting as it didn’t seem to really help.
Forum: Themes and Templates
In reply to: [GeneratePress] Google fonts slowing load time?Thanks for the great information. I will look into locally hosting. But for the first suggestion, I don’t see anything in Appearance > Customize > Typography about removing language variants – only weight and italic. I don’t need greek and such.
Forum: Plugins
In reply to: [Search Regex] TablePress Tables don’t get searched/replacedOK, I redid the change in the complex table and found what is happening. Search Regex is removing all the escape characters (\) from the content of the table while it is making the simple edit. The first is in <span class=\”sansGr10\”>, the rest are newline characters \n.
Here is the content of the table. The first is the original, valid table.
[["Phylum","Subgroup","Some major genera"],["<b>Oomycota</b>","Oomycetes","<i>Phytophthora, Pythium</i> (water molds and downy mildews)"],["<strong>Glomeromycota</strong>","Glomeromycetes","<i>Acaulospora, Gigaspora, Glomus</i> (arbuscular/endomycorrhizal fungi)"],["<b>Zygomycota</b>","Endogonales","<i>Endogone</i> (ectomycorrhizal fungi, saprobes)"],["","Mucorales","<i>Mucor, Rhizopus</i> (mostly common saprobes)"],["<b>Ascomycota</b>","<span class=\"sansGr10\">Classification of the Ascomycota is so complex, it is better for the beginning student to focus instead on forms of fruiting as presented here","#colspan#"],["","naked asci","<i>Taphrina</i>"],["","perithecia","<i>Nectria, Ceratocystis, Ophiostoma, Valsa</i>"],["","cleistothecia","<i>Microsphaera</i>"],["","apothecia","<i>Peziza, Rhizina, Rhytisma</i> (saprobes, root pathogens, ectomycorrhizal fungi)"],["","pseudothecia","<i>Apiosporina, Phaeocryptopus</i>"],["","<b>Asexual forms of Ascomycota</b>","#colspan#"],["","simple conidiophores","<i>Verticillium\nPenicillium</i>"],["","coremium","<i>Graphium</i>"],["","sporodochium","<i>Fusarium</i>"],["","acervulus","<i>Gloeosporium\nMarssonina</i>"],["","pycnidium","<i>Sphaeropsis\nCytospora</i>"],["","",""],["<b>Basidiomycota</b>","Agaricales","Mushrooms (<i>Armillaria</i>), puffballs and bird's nest fungi (<i>Lycoperdon, Crucibulum</i>), and coral fungi (<i>Clavaria</i>)"],["","Boletales","Poroid mushrooms (<i>Boletus</i>), gasteroid fungi (<i>Pisolithus, Scleroderma</i>) and merulioid crust fungi (<i>Coniophora, Serpula</i>)"],["","Corticiales","A small residual group of mostly corticioid fungi; not important in forest pathology (<i>Corticium, Vuilleminia</i>)"],["","Hymenochaetales","Polypores (<i>Inonotus, Onnia, Oxyporus, Phellinus, Trichaptum</i>) and crust fungi (<i>Hymenochaete, Hyphoderma, Hyphodontia</i>)"],["","Polyporales","Polypores (<i>Fomitopsis, Ganoderma, Oligoporus, Phaeolus, Polyporus</i>) and corticioid fungi (<i>Phanerochaete, Pulcherricium</i>)"],["","Russulales","Polypores (<i>Albatrellus, Bondarzewia, Heterobasidion</i>), tooth fungi (<i>Echinodontium, Hericium</i>), crust/stereoid fungi (<i>Peniophora, Scytinostroma, Stereum</i>) and mushrooms (<i>Lactarius, Russula</i>)"],["","Pucciniomycetes","<i>Cronartium </i>(rusts), <i>Helicobasidium</i>"]]Then, I used Search Regex to replace the word Oomycota, in the first row, with the word replacement. I copied the content from both in the sql database and compared them using BBEdit. It did that change, but you see it also stripped out the escape characters from elsewhere in the content.
[["Phylum","Subgroup","Some major genera"],["<b>replacement</b>","Oomycetes","<i>Phytophthora, Pythium</i> (water molds and downy mildews)"],["<strong>Glomeromycota</strong>","Glomeromycetes","<i>Acaulospora, Gigaspora, Glomus</i> (arbuscular/endomycorrhizal fungi)"],["<b>Zygomycota</b>","Endogonales","<i>Endogone</i> (ectomycorrhizal fungi, saprobes)"],["","Mucorales","<i>Mucor, Rhizopus</i> (mostly common saprobes)"],["<b>Ascomycota</b>","<span class="sansGr10">Classification of the Ascomycota is so complex, it is better for the beginning student to focus instead on forms of fruiting as presented here","#colspan#"],["","naked asci","<i>Taphrina</i>"],["","perithecia","<i>Nectria, Ceratocystis, Ophiostoma, Valsa</i>"],["","cleistothecia","<i>Microsphaera</i>"],["","apothecia","<i>Peziza, Rhizina, Rhytisma</i> (saprobes, root pathogens, ectomycorrhizal fungi)"],["","pseudothecia","<i>Apiosporina, Phaeocryptopus</i>"],["","<b>Asexual forms of Ascomycota</b>","#colspan#"],["","simple conidiophores","<i>VerticilliumnPenicillium</i>"],["","coremium","<i>Graphium</i>"],["","sporodochium","<i>Fusarium</i>"],["","acervulus","<i>GloeosporiumnMarssonina</i>"],["","pycnidium","<i>SphaeropsisnCytospora</i>"],["","",""],["<b>Basidiomycota</b>","Agaricales","Mushrooms (<i>Armillaria</i>), puffballs and bird's nest fungi (<i>Lycoperdon, Crucibulum</i>), and coral fungi (<i>Clavaria</i>)"],["","Boletales","Poroid mushrooms (<i>Boletus</i>), gasteroid fungi (<i>Pisolithus, Scleroderma</i>) and merulioid crust fungi (<i>Coniophora, Serpula</i>)"],["","Corticiales","A small residual group of mostly corticioid fungi; not important in forest pathology (<i>Corticium, Vuilleminia</i>)"],["","Hymenochaetales","Polypores (<i>Inonotus, Onnia, Oxyporus, Phellinus, Trichaptum</i>) and crust fungi (<i>Hymenochaete, Hyphoderma, Hyphodontia</i>)"],["","Polyporales","Polypores (<i>Fomitopsis, Ganoderma, Oligoporus, Phaeolus, Polyporus</i>) and corticioid fungi (<i>Phanerochaete, Pulcherricium</i>)"],["","Russulales","Polypores (<i>Albatrellus, Bondarzewia, Heterobasidion</i>), tooth fungi (<i>Echinodontium, Hericium</i>), crust/stereoid fungi (<i>Peniophora, Scytinostroma, Stereum</i>) and mushrooms (<i>Lactarius, Russula</i>)"],["","Pucciniomycetes","<i>Cronartium </i>(rusts), <i>Helicobasidium</i>"]]Forum: Plugins
In reply to: [Search Regex] TablePress Tables don’t get searched/replacedI made a very simple test table and tried to replace a word; it worked without corruption. So whatever the problem is it involves some complexity beyond that.
Forum: Plugins
In reply to: [Search Regex] TablePress Tables don’t get searched/replacedWhen I looked into the sql database after the corruption, it looked like my original nonsense word in the TablePress table was still there, not replaced, but TablePress couldn’t open it (failing with the message quoted previously). It is barely human readable, and I couldn’t find what had changed.
Again, I was simply replacing one text word with another – no symbols or characters other than a-z.
Perhaps I’ll try making a very simple test table and changing it with Search Regex to see if I can find what is happening.
Forum: Plugins
In reply to: [Search Regex] Use Search Regex on just one single page?You’re right. I went off half-cocked.
Forum: Plugins
In reply to: [Search Regex] TablePress Tables don’t get searched/replacedThe case where simply trying to search replace in a table found nothing and had no effect was a regex search.
Now I’ve tried a simple word search/replace with a nonsense word I put in the table. This did find it, but when I replaced with the correct word (manually in Search Regex, not globally), the table become corrupted. When I try to open it in TablePress I get:
Attention: Unfortunately, an error occurred.
The internal data of table “Major Groups of Fungi” (ID 1) is corrupted. The following error was registered: Syntax error.
Because of this error, the table can not be edited at this time, to prevent possible further data loss. Please see the TablePress FAQ page for further instructions.
I went into the database, couldn’t see what was wrong, but copied the table content from an earlier revision and got the table working again.
Thanks. I can’t control the url; Wordfence does that. Can you explain what you mean by “or put a wide to this link”?
Thank you @wphil. Strangely it rectified itself. If it happens again I’ll come back to these steps.
Forum: Fixing WordPress
In reply to: Found there are pages on my site with /embed/ suffixThanks for the clue and links, but I still don’t quite get it. I did find if I post the url of one of my pages, followed by embed/, in another page, it does trigger an embed block (complete with heading and caption).
But why is google seeing these embed pages if they don’t really exist? I had never seen them. And why do some pages have embed versions and others don’t (at least not seen by google).
Does the existence of an embed page mean someone has embedded that page in one of their posts?
Forum: Plugins
In reply to: [Accordion Blocks] Light?Thanks, looks perfect!