@cstyn
as I said, you need to *choose* which fonts you want to use on your site, as I did with Open Sans. In my examples, you would choose the fonts you want, search/replace those in the stlyes.css file, then grab CSS from Google for those chosen fonts, then put the CSS at bottom of your style.css; then hack the functions.php to no longer pull the stock fonts from Google since you’re loading your custom fonts.
Best to stick with built in theme font selectors, in your case, at this time. If you don’t yet know the purpose of the style.css, then this will be beyond you for the time being.
Best wishes, and sorry I couldn’t make that all any simpler.
@cstyn
Re: custom fonts, and custom font loading …. simply removing code from functions.php is just *one* step as I outlined in detail. That step is only part of it to remove the theme calling on Google to load the fonts. If you don’t do all the other elements, like picking the NICE fonts you want and actually adding the CSS to your style.css file, then it serves no purpose. If it’s beyond you, then as I said, it’s best to stick with the built in theme functions until you get more adept at “hacking” WordPress and WP themes, which takes some time (I’ve been doing it a looooong time, and I still get lost on stuff!). 🙂
-
This reply was modified 11 years by
simchris.
You likely need to try using the pagebuilder blocks to make a custom page; or perhaps create custom widgetized areas via normal practice in wordpress, or perhaps hiring a custom developer to work outside the parameters of the theme.
Um…. did you look at the POST SETTINGS in the theme panel ? Under “sharing.”
There are no “custom settings” – no.
You can turn ON the basic set of buttons or the basic counter style buttons, or OFF if you want to use a plugin like AddThis, ShareIt, etc.
We use the default on one of our sites as that is the most popular things and it’s optimized for best speed (yay!). For another site we use AddThis as it adds more choices for top/bottom, counters, [+] button to all the optional things like Tumbler, etc.
For developers who need custom specific buttons for their specific audience, you can edit the code to add more buttons, as needed.
If you want easy route: use AddThis plugin 🙂
-
This reply was modified 11 years by
simchris.
You likely need to use the HTML entity characters for those letters in those spots.
http://dev.w3.org/html5/html-author/charref
HI, Lucian
Thanks! … will give these a go and see what works for me.
See, even I need support sometimes! 😉
Basically what I’ve done for my site is
(not using child themes as they add CSS redirects bad for SEO/speed)
a) search/replace all instances of fonts I don’t want to load from Google in my style.css file; using common font stacks for fallback such as 'Open Sans',Arial,sans-serif
(if you don’t know what font stacks are, see: http://cssfontstack.com/
b) set all my fonts in theme panel to ‘default’ so there is no code if/then trying to insert any custom fonts into header/footer/speedbooster
c) commented out the code in functions.php which loads google fonts on the page; and also removed the section of code which has the various links to theme fonts on google I won’t be using; no need to have if/then code asking to load fonts from google if I’m never going to do that via theme code (as per examples in my prior posts in this thread); need to both or you will get error. Same code in 4.22, 4.3 and 4.4 versions of theme.
d) I grabbed the link from google fonts website for the font I wish to use (as per my example above in this thread), then pulled the actual css from that link so I won’t be loading the links to the fonts from their CSS file (one less CSS file loaded on page); placed this at bottom of my own style.css file after the minified code, so that it lives in its own section after theme styles.
All of this was done with caching off, mod_pagespeed off, so that changes are picked up immediately. When editing my files I use either TextPad on the PC, or BBEdit on the Mac, to ensure my files have Linux/Unix line breaks since I’m using Linux web server. Some PC editors will put “Windows line breaks” in files, which are bad for Linux servers, in some cases, and can cause parsing errors. So, helps to know what you’re doing if editing core files for a web server.
PURPOSE OF ALL OF THIS:
1) speed up website
2) remove intermediate call to CSS style sheet on google, which may not have proper expiration headers/TTL, and may show “advisory” from testing GTMetrix,PageSpeed Insights, etc. – may help “rating” by removing one so-called issue caused by Google’s own system.
You do *NOT* need to do this, unless you have ALL OTHER optimizations in place. Many sites load their fonts from Google using their function call as it’s essentially loading from a CDN. However, “hacking” the theme for this purpose can help advanced users resolve those last couple of ratings issues, and also those obsessed with micro-optimizations.
WARNING
this hack must be done EVERY time you update the theme; so if not willing to do that, best to skip this whole subject and get on with creating great content which is better for SEO and SERPS than saving a couple of milliseconds on font loading.
You need to *decide* what fonts you wish to use for the theme.
If all of this is beyond you, then you can simply stick with the standard font usage as most sites do. What we’re talking about here is somewhat advanced; and if it doesn’t make sense, then you should likely skip this and worry about other necessary site optimizations.
If you look at my code from functions.php in 4.4 version of theme, you will also need to comment out the line that calls the Google fonts (using // ):
/* ----------------------------------------------------------------------------
CSS - front end
*/
function td_load_css() {
//google fonts
if ((defined('TD_DEPLOY_MODE') and (TD_DEPLOY_MODE == 'demo' /*or TD_DEPLOY_MODE == 'dev' */)) or defined('TD_SPEED_BOOSTER')) { //on demo and dev we load only the latin fonts
//modify this collection if you want to optimize the fonts loaded
//collection url -> : http://www.google.com/fonts#ReviewPlace:refine/Collection:PT+Sans:400,700,400italic|Ubuntu:400,400italic|Open+Sans:400italic,400|Oswald:400,700|Roboto+Condensed:400italic,700italic,400,700
//wp_enqueue_style('google-font-rest', td_global::$http_or_https . '://fonts.googleapis.com/css?family=PT+Sans:400,700,400italic|Ubuntu:400,400italic|Open+Sans:400italic,400|Oswald:400,700|Roboto+Condensed:400italic,700italic,400,700'); //used on menus/small text
}
and I deleted this
$td_user_fonts_list = array();
$td_user_fonts_db = td_util::get_option('td_fonts');
if(!empty($td_user_fonts_db)) {
foreach($td_user_fonts_db as $td_font_setting_key => $td_font_setting_val) {
if(!empty($td_font_setting_val) and !empty($td_font_setting_val['font_family'])) {
$td_user_fonts_list[] = $td_font_setting_val['font_family'];
}
}
}
if(!in_array('g_438', $td_user_fonts_list)) {//'g_438', //Open Sans
wp_enqueue_style('google-font-opensans', td_global::$http_or_https . '://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700&subset=latin,cyrillic-ext,greek-ext,greek,vietnamese,latin-ext,cyrillic'); //used on menus/small text
}
if(!in_array('g_617', $td_user_fonts_list)) {//'g_617', //Ubuntu
wp_enqueue_style('google-font-ubuntu', td_global::$http_or_https . '://fonts.googleapis.com/css?family=Ubuntu:300,400,500,700,300italic,400italic,500italic,700italic&subset=latin,cyrillic-ext,greek-ext,greek,latin-ext,cyrillic'); //used on content
}
if(!in_array('g_453', $td_user_fonts_list)) {//'g_453', //PT Sans
wp_enqueue_style('google-font-pt-sans', td_global::$http_or_https . '://fonts.googleapis.com/css?family=PT+Sans:400,700,400italic&subset=latin,cyrillic-ext,latin-ext,cyrillic'); //used on content
}
if(!in_array('g_445', $td_user_fonts_list)) {//'g_445', //Oswald
wp_enqueue_style('google-font-oswald', td_global::$http_or_https . '://fonts.googleapis.com/css?family=Oswald:400,300,700&subset=latin,latin-ext'); //used on content
}
if(!in_array('g_521', $td_user_fonts_list)) {//'g_521', //Roboto
wp_enqueue_style('google-roboto-cond', td_global::$http_or_https . '://fonts.googleapis.com/css?family=Roboto+Condensed:300italic,400italic,700italic,400,300,700&subset=latin,cyrillic-ext,greek-ext,greek,vietnamese,latin-ext,cyrillic'); //used on content
}
if(!in_array('g_639', $td_user_fonts_list)) {//'g_639', //Vollkorn
wp_enqueue_style('google-vollkorn', td_global::$http_or_https . '://fonts.googleapis.com/css?family=Vollkorn:400italic,700italic,400,700'); //used on quoates classic
}
}
You would still need to search/replace all instances of Google fonts in your style.css as I stated to replace all font stacks with the Google fonts you wish to use. Or, you’d need to look at the fonts in there to use for grabbing the CSS from Google Fonts to put at bottom of your style.css file.
Of course my solution is based on concept of usability for NEW posts, so that when new content is “featured” you have larger image already to go for home page without having to back-track after the fact. You don’t have to regen old images unless you want to 🙂
Bumps and bumbs dont do anything.
Use the plugin i have recommended 10 times for creating larger thumbs, which is thumbnail upscale
Try using the stock wordpress theme to debug the issue.
also remember if using demo content to setup theme, that is really only to help with setup and not for actual production site, so you obviously need real content to populate feed.
Try testing feed with cache off. You should only use cache once everything else is working.
If you look at the v 4.4 ‘changelog’ that comes with the theme, you will see that the 980px layout has been deprecated (retired) in order to make a better grid system more compatible with wider range of mobile devices, and for those who want more options for columnar layouts, likely based on how Bootstrap 3 is setup.
For now, you would need to stick with 4.22 or 4.3 in order to keep that style you’re looking at using.
Put another way, there is no longer a 980px grid in the theme.
@mehedi… usual way; custom CSS on the element
.block-title {line-height: 28px;background-color:#000000}
I don’t use cloudflare so not much help, sorry.
Google is a great search tool… as this is a common practice easily researched which has nothing to do with this theme. Learning these kinds of tricks is part of basic web development using Google fonts. 😉
However, the basics are
1) search/replace all font mentions in the style.css to use the Google font you wish to use; in my case ‘Open Sans’
2) go to the Google fonts site, and find the font you want in the weights you want, in my case ‘Open Sans’ and get the code from them to place into your website
https://www.google.com/fonts#UsePlace:use/Collection:Open+Sans
in my case, normal, normal italic, bold, bold italic
3) choosing the above gives you code you’d normally place in the head of your web doc, or footer for some setups
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700' rel='stylesheet' type='text/css'>
The above is essentially what the theme loads except has various hooks and functions to let you select those in the admin panel; however you want to actually instead, take that CSS and put at bottom of your own style.css file and it can be done after minification (if you’re doing that) so you don’t minify this code.
So, basically take that URL and open in a web browser; which should download it to your hard drive;
4) then, open that and it will give you the CSS
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
src: local('Open Sans'), local('OpenSans'), url(http://fonts.gstatic.com/s/opensans/v10/cJZKeOuBrn4kERxqtaUH3T8E0i7KZn-EPnyo3HZu7kw.woff) format('woff');
}
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 700;
src: local('Open Sans Bold'), local('OpenSans-Bold'), url(http://fonts.gstatic.com/s/opensans/v10/k3k702ZOKiLJc3WVjuplzHhCUOGz7vYGh680lGh-uXM.woff) format('woff');
}
@font-face {
font-family: 'Open Sans';
font-style: italic;
font-weight: 400;
src: local('Open Sans Italic'), local('OpenSans-Italic'), url(http://fonts.gstatic.com/s/opensans/v10/xjAJXh38I15wypJXxuGMBobN6UDyHWBl620a-IRfuBk.woff) format('woff');
}
@font-face {
font-family: 'Open Sans';
font-style: italic;
font-weight: 700;
src: local('Open Sans Bold Italic'), local('OpenSans-BoldItalic'), url(http://fonts.gstatic.com/s/opensans/v10/PRmiXeptR36kaC0GEAetxjqR_3kx9_hJXbbyU8S6IN0.woff) format('woff');
}
PLACE the above, or comparable code for the fonts you’re using, into bottom of your CSS file. If you’re running your site as https, then change URL to https.
5) using the info from my previous post in this thread; remove the section in the functions.php file which loads the Google fonts – so the old “calls” to the Google fonts won’t “print” on your HTML pages.
6) finally, if necessary, make sure you have all the font selections in the theme panel set to “default” as choosing any Google font won’t work, obviously
And obviously you would want to ensure your caching is off, mod_Pagespeed is ‘off’ if using that, and you’d likely need to clear your cache in your web browser and hit refresh couple of times to see the site properly with the change.
Kaboom! Mischief managed.
featured images would change to https; but anything “placed” into a post, you’d have to do search/replace in the dbase, as was discussed earlier in the thread.
Yes, you do want it to redirect from http to https; that’s the idea.
You may get a loop if your site isn’t actually setup for https with an SSL cert.
I see you have it turned off now.
Sort of fixed #3 with custom CSS
.header-content-rec{padding-bottom:15px; margin-bottom:10px;}
I’m not getting the error with 4.4, so it may be a plugin issue or a bad character in the most recent post; check your headline/title, as sometimes something copy-pasted might pickup a bad character although WP pretty good about ‘encoding’ those; not always with some foreign characters with accents.
Actually … if I may chime in …
if you use my trick to edit the wp-config.php file, as I suggested, to put in the directive to state the site is https:// you don’t need to do any redirect as WordPress will do that automatically as a redirect for http:// requests. QED.
For instance this also fixes it so that when you go to
WP admin > settings > general settings –
the URL will now show https://yoursite
You can see this “in action” where I did this last week here:
http://www.send2press.com/guru/
note the soft redirect to https, with the theme (I think this is v4.2.2)
ALSO: Google *does* want the ENTIRE site to be https, not just the home page. The idea is to make the web more “trusted” with encrypted connections.
So, if you have a service information page on your site, that needs to be https also. The idea being for a ranking signal, that if you and your competitor both have the same perceived value, if one is https and one is http, the https site will rank a dot higher.
To properly secure your site you do need an SSL certificate installed on your domain. A self-signed cert “might” work for Google’s purposes, but this has not yet been fully acknowledged, although mod_pagespeed does support self-signed certs for pulling http content over https, although we’re doing it using the static paths method.
Yes, I see that also. The “z-index” for the mega menu appears to be lower than the Google ad when you have the logo + ad below menu setup.
[menu]
[logo][ad]
You likely need to increase the z-index for the mega-menu. I’m not using the mega-menu at this time, so not sure what class would need to be wrapped, and added to the custom CSS panel.
If you’re using the full-text RSS feed, try changing it to the summary feed and see if you still get the error.
Well, in our case we were not changing anything except links to embedded images in the posts, so doing it on the server side after making clean backup, and editing only the post tables to search/replace the image location worked for us. Luckily in our case we never used the date based directories for images, and always change from /uploads/ to something like /images/ or /meta/ or /pix/ or whatever.
So simply changing embedded text within the post data worked fine, once we looked at an actual record in the database, copied the actual info in the dbase and search/replaced that by simply adding https vs http to the <img src="http://mysite/images/*
Obviously anybody who is going to edit their dbase file should VERY CAREFULLY research the risks, and make sure
1) backup of data from the WP admin panel
2) backup of dbase from the phpmyadmin or similar
3) possibly full snapshot backup as gzip file of entire website before doing anything at all
If the tool @TheMediumUTM is suggesting works 100%, then that would obviously be the way to go if it supports the wildcard search/replace within a specific data field.
I’ve just been doing it from the server side for almost 20 years, so always first go-to over using some plugin for WordPress, which I generally distrust to edit dbase files; and frankly not even sure our server would allow a plugin to touch the dbase unless this tool is actually simply global editing the posts as posts, vs actually doing dbase mods above the level of the site.
I guess it also depends on how many pages you have. If you have 10,000+ pages, then maybe doing it via phpadmin, and asking your hosting support to do that could be better.
I’ve not looked at that plugin, so have no actual opinion about it…. (and so why am I rambling on here on a Saturday morning anyway?)….. 🙂
@Shashank
if you’re doing it manually, obviously that works too!