We’ve been using preview fonts from myfonts.com in our Newspaper6 site, currently visible at http://79.170.40.247/wellbeingofwomen.org.uk/
We now have a myfonts.com preview bar at the top of the site that we can’t seem to remove.
We have now purchased the fonts we need, but we’re not sure what to do next.
The blue bar seems to appear due to these lines of code in our head tag:
<script src="http://easy.myfonts.net/v2/js?sid=250385(font-family=Geometria+Bold)&sid=250387(font-family=Geometria+ExtraLight)&sid=250395(font-family=Geometria+Medium)&sid=250397(font-family=Geometria)&key=Kiee4jHq8u" async="" type="text/javascript"></script>
<style type="text/css">@font-face{font-family: 'Geometria Bold';src:url('http://easy.myfonts.net/v2/woff?562X4fG6ulXbAB9bQ8dbslp3QMgO911oQh7HPj47Qv2i09hp2Q8MmluW9Nh&Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cCo6Ly8qL3YyL3dvZmY~NTYyWDRmRzZ1bFhiQUI5YlE4ZGJzbHAzUU1nTzkxMW9RaDdIUGo0N1F2MmkwOWhwMlE4TW1sdVc5TmgiLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjE0NTQwMjU2MDB9fX1dfQ__&Signature=kZFseQIZIYlaB9Q8JtJPdXnKdeRUjd7swRSSR0BuN4EZQkQ0YzjjQGPSfA~FpLLL4TYXAKndPFuSIsolCWkyN2wtbooLBNem7fgzbLDNBmA2nDaVcxjsx0rtvumUpB1DfWYzod-CUq5tjRmvZF5zorUyEqUJMAAX9laX-sVw93i8BmYPZ882C4T4GHUlFGyE58wLmNXRdJZ4BgMfGfYtMiX7y4KymOry6Dnypd~s1-ZtbMXBvLWfjnjkRLh8mh7Ml-vuHuyOUQJAqTclYqaJxV8H8W84mLLhauMdFAa13M7ptV~uNsXGCYSYsmXz0R3c8eG1Vp2e6rXlX6FWJRTCAg__&Key-Pair-Id=APKAJN6QFZEE4BZCL6XQ')format("woff");}@font-face{font-family: 'Geometria ExtraLight';src:url('http://easy.myfonts.net/v2/woff?562X4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CL6XQ')format("woff");}@font-face{font-family: 'mfPreviewBar';src:url('http://easy.myfonts.net/v2/woff?3PdlVSHpd7Hb4L4qAoRMDakZi16M0RpmI3EP9tHSYPt4rZVf11lsK3v&Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cCo6Ly8qL3YyL3dvZmY~M1BkbFZTSHBkN0hiNEw0cUFvUk1EYWtaaTE2TTBScG1JM0VQOXRIU1lQdDRyWlZmMTFsc0szdiIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTQ1NDQ1NzYwMH19fV19&Signature=VEGzej2BXVFFoY7LJiG7lv3sMXb0WXoUQ8wC3xwQgdQmUijcisMmmQTBhiRi1uLG2HhqSkQ6FaLQ-PLIn2TyMHRj~fJEN6O69PmYJy9M50mv9EitSwZOE7EFeABRnfUO7vPei~B9bZqKrdL~sKrUNOIFJou3jijgkpProcDBSW2DV~XcqNYp0im30P0WiQfNVfootkTxkfK3tLXlJgivHVcteWRKKpZVpkvm6A1MR6mlbcE9NkvXaiSi0LXXzG31pSIX9Cao6VjryzFkVly3yTIb5O7cQFKsOSK-b601L6giX7V67qq1LN8zmqPWBCfyEj9RDhExqzZysfx0N91R3g__&Key-Pair-Id=APKAJN6QFZEE4BZCL6XQ')format("woff");}@font-face{font-family: 'mfPreviewClose';src:url('http://easy.myfonts.net/v2/woff?3PdlVSHpd7Hb4K9jlS00jWqjbS2a5815XXmPeaSL9YIPNQ6esQUYvfv&Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cCo6Ly8qL3YyL3dvZmY~M1BkbFZTSHBkN0hiNEs5amxTMDBqV3FqYlMyYTU4MTVYWG1QZWFTTDlZSVBOUTZlc1FVWXZmdiIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTQ1NDM3MTIwMH19fV19&Signature=Mo2rd4F~a89yEd1bzW-BXZBthtTlOjJI7qFExnYKq2ihKewhVk5fcAGalJia1Bd1DnDi-H23Gv3RBkzDDFIMDtdSeo299gvXR2JJUmhaFILsq1d-fpajhps0R9YxO2dCZacQiaMYkEVVk9c37nrvivthAkm0ZTwZB9y6pxbz0hiB3ku5Ms~2QIZUh~EnXBayozTGiszjtKLD25Wt9Fnh2cVZV4cEoyjYJ33w6DncdP21sBK7uKFj-H2rBzdcdx7nCeGaBYlVVM95iqU5xuBSI0oNCNZM9~0ITitRZ-qv4AeD9AjFhlSxjSuQPP8OrbHa4eCxza-3Pa5nj8PjSLrXkw__&Key-Pair-Id=APKAJN6QFZEE4BZCL6XQ')format("woff");}</style>
<link href="http://cdn.myfonts.net/widgets/webfont_preview_bar/webfont_preview_bar.css" type="text/css" rel="stylesheet">
However, we’re not adding this code ourselves. It’s not visible in View Source, so it seems to be added dynamically by the Newspaper6 theme.
We’re not entirely of the steps we took to get to this stage, but we’re guessing it was via the Custom Fonts page in the Theme Panel – either in the ‘Custom font files’ section, or the ‘Typekit.com Fonts’ section.
In the ‘Typekit.com Fonts’ section, we did enter some custom javascript that we got from myfonts.com (not sure if this would even work). We have since replaced that with an empty script tag, but the preview bar remains at the top of the site.
How can we remove this preview bar?
Hi,
The bar is added from your code and have a specific css and it doesn’t come from Newspaper theme – http://screencast.com/t/zeyGaE61s it is like an advertisement for myfonts. You can do a clean theme install on a subdomain and see that the theme doesn’t have such of preview bar. I suggest to contact the font’s author and ask about this.
Thanks!
-
This reply was modified 10 years by
Alin [tagDiv].
Hi Alin, thanks for your reply.
Yes, I appreciate that this preview bar is not a direct result of the Newspaper6 theme. However, I think you might still be able to help us.
I think we have somehow changed one of the theme settings, and this is what is injecting the Myfonts code into the page.
If you view the source of http://79.170.40.247/wellbeingofwomen.org.uk/ and search for ‘myfonts’ you will find this section:
<!-- JS generated by theme -->
...
<script type="text/javascript">
(function() {
var path = '//easy.myfonts.net/v2/js?sid=250385(font-family=Geometria+Bold)&sid=250387(font-family=Geometria+ExtraLight)&sid=250395(font-family=Geometria+Medium)&sid=250397(font-family=Geometria)&key=Kiee4jHq8u',
protocol = ('https:' == document.location.protocol ? 'https:' : 'http:'),
trial = document.createElement('script');
trial.type = 'text/javascript';
trial.async = true;
trial.src = protocol + path;
var head = document.getElementsByTagName("head")[0];
head.appendChild(trial);
})();
</script>
<!-- Header style compiled by theme -->
If I search a mysql dump of our database, I can also find this data:
INSERT INTO wowwp_options VALUES (
...
(607,'td_011','a:271:{s:15:\"tds_logo_upload\";s:94:\"http://79.170.40.247/wellbeingofwomen.org.uk/wp-content/uploads/2016/01/WoW_horizontal-500.png\";s:13:
...
var path = \\\'//easy.myfonts.net/v2/js?sid=250385(font-family=Geometria+Bold)&sid=250387(font-family=Geometria+ExtraLight)&sid=250395(font-family=Geometria+Medium)&sid=250397(font-family=Geometria)&key=Kiee4jHq8u\\\'
So it appears that the source of the myfonts code within the “JS generated by theme” is one of the entries in the wp_options table.
I suspect the way it got there was via this panel in Theme Panel > Theme Fonts > Custom Fonts:
http://i64.tinypic.com/28tb6gx.jpg
We originally had the myfonts code pasted in here. We’ve tried to overwrite it with a simple empty script tag, but this doesn’t seem to have worked.
Can you help us to fix this?
Hi,
I’m not aware about myfonts implementation to the theme and like I said above the code that you use add this preview bar(it is an advertisement) and if you implement this using a script code of course that it will loaded by the theme. There is a guide how to add a custom font if you check our documentation, you don’t have to add anything in Typekit section – https://forum.tagdiv.com/using-custom-fonts/ If you add a script try to load it in Custom javascript area – http://screencast.com/t/CRl81ED1Hk
I can provide you a custom css to hide that bar, but if you want to remove it from the code I suggest to contact the font author – http://screencast.com/t/1LGkLeZ3
#mfPreviewBar {
display: none;
}
Thanks!
Hi Alin, thanks for your reply, and for the custom CSS. Using the CSS would hide the problem, but it would be better if we could get rid of this javascript code completely.
I understand we’re not required to add anything to the Typekit section. And, admittedly, we probably shouldn’t have put Myfonts code in there either. But it’s happened now. And now that javascript is in the database and being injected into the page (<!– JS generated by theme –>)
What we want to do now is remove that code. We’ve tried overwriting the contents of the Typekit box with <script></script> (http://i64.tinypic.com/28tb6gx.jpg), but we still get the same Myfonts code being injected.
By the way, I have searched all of our theme files – we definitely haven’t hardcoded this into our child theme. It must be coming from the database.
I seem to have no option but to edit the database directly – unless you can help me figure out a way to remove it via the theme settings.
Hi,
You can send an email at contact@tagdiv.com and provide wp-admin and ftp access and we will take a look but I cannot promise you anything, if we don’t manage to solve this from the theme settings/code I’m afraid that you will need to get someone to help to remove it from database. If you send the email paste also a link to this topic and we will take a look as soon as possible(please note that we don’t work on weekends).
Thanks!