Tagged: x
-
AuthorPosts
-
February 9, 2017 at 12:01 pm #1364596
Hello, I just got the theme setup and playing with it for our new church website.
I want to use Nanum Google Fonts and I don’t see it in the Typegraphy. How can I include that?Thanks,
Jerry
February 9, 2017 at 2:38 pm #1364775Hi Jerry,
Please install a child theme then add this code in the child theme’s functions.php:
/** * Enqueue font. */ add_action( 'wp_enqueue_scripts', 'load_font' ); function load_font() { wp_enqueue_style( 'nanum-google-font', 'http://fonts.googleapis.com/earlyaccess/nanumpenscript.css' ); }
I am not certain which Nanum font you want to use but kindly find the font code here: https://fonts.google.com/earlyaccess#Nanum+Pen+Script and replace http://fonts.googleapis.com/earlyaccess/nanumpenscript.css.
Then set the fonts in the CSS customizer like this:
body { font-family: 'Nanum Pen Script', cursive; }
Hope this helps.
February 10, 2017 at 12:10 am #1365506Please understand that I am new to WordPress.
It looks like child theme is to override the part where we do some custom work.
I am wondering if it’s going to work if I want to customize type faces for Menus, Headings, notices …Is there a way to use the x-theme UI to pick Korean fonts?
If not, does this mean I am customizing all the styles
in style.css under x-child theme?Thanks!
February 10, 2017 at 1:53 am #1365590Hi there,
Thanks for writing back. Yes it’s not possible to add them within the Customizer UI and you need to add them with Child theme as instructed above. Also you can set your custom font for any element including Menus, Heading etc.
Cheers!
February 10, 2017 at 10:07 am #1365999Where is the CSS customizer, I tried on Page Settings to override BODY style like:
font-family: ‘Nanum Gothic’, sans-serif;
It looks like it doesn’t make any difference.
Here is what I have in functions.php under x-child theme folder.
add_filter( ‘x_enqueue_parent_stylesheet’, ‘__return_true’ );
function load_font() {
wp_enqueue_style( ‘nanum-gothic-font’, ‘http://fonts.googleapis.com/earlyaccess/nanumgothic.css’ );
}thanks!! Jerry
February 10, 2017 at 2:30 pm #1366286Hi Jerry,
Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:
– Link to your site
– WordPress Admin username / password
– FTP credentialsDon’t forget to select Set as private reply. This ensures your information is only visible to our staff.
February 10, 2017 at 4:17 pm #1366406This reply has been marked as private.February 11, 2017 at 12:32 am #1366777Hi there,
You may contact your hosting provider about the FTP credentials.
1. The code has missing implementation. You didn’t add this
add_action( 'wp_enqueue_scripts', 'load_font' );
It’s different from this line, this is child theme default code and not related to above code.
add_filter( 'x_enqueue_parent_stylesheet', '__return_true' );
Hence it should be like this
add_filter( 'x_enqueue_parent_stylesheet', '__return_true' ); add_action( 'wp_enqueue_scripts', 'load_font' ); function load_font() { wp_enqueue_style( 'nanum-gothic-font', 'http://fonts.googleapis.com/earlyaccess/nanumgothic.css' ); }
2. What part of the page text’s font did you wish to change? Changing body font will not change all other fonts because each element could have or has its own styling. Example, the headlines, they have separate font styling from the body. I need to know which should be changed so I could confirm if it’s working.
3. There is no way you could apply the font styling within page settings section. Because it has no style input, but just class input. They are both different, what you need to add on class input is class name and not direct CSS.
Customizer’s custom CSS is within Admin > Appearance > Customizer > Custom > CSS
Thanks!
February 14, 2017 at 9:39 am #1370544Thanks for your reply.
Two more questions: sorry 🙂CSS Customizer: We are talking about global CSS, right?
I want to be able to update probably most of the styles with Korean Fonts.
Is there a list of styles and fonts in relation to the sample Pages so I can update the global css accordingly?
Thanks,
Jerry
February 14, 2017 at 11:06 am #1370707Hi Jerry,
Yes, the CSS customizer that is in Appearance > Customize > Custom > CSS.
We do not have a list of the CSS selectors that you can use but you may follow this link to get a specific element’s selector: https://dailypost.wordpress.com/2013/07/25/css-selectors/
Hope this helps.
February 14, 2017 at 1:35 pm #1370882Thanks for your reply you guys are fast … 🙂
One more question:When I go to Cornerstone Edit mode, all the buttons shows strange characters. It almost looks like it’s using a special fonts on the button face, except the spelled out descriptions. How can I correct that?
February 14, 2017 at 10:55 pm #1371394Hi there,
That sounds unusual. Can you show us some screenshot?
Thanks!
February 20, 2017 at 8:53 pm #1379152Attached … Please check …
February 21, 2017 at 1:34 am #1379376Hi there,
I see following error:
Access to Font at 'http://kfbctampa.org/wordpress/wp-content/themes/x/framework/fonts/font_awesome/fontawesome-webfont.woff2?v=4.6.3' from origin 'http://www.kfbctampa.org' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://www.kfbctampa.org' is therefore not allowed access. The response had HTTP status code 404.
Please connect to FTP and add following lines in .htaccess file :
<IfModule mod_headers.c> Header set Access-Control-Allow-Origin "*" </IfModule>
Hope it helps.
March 7, 2017 at 9:19 pm #1398591Thanks for your reply. Our hosting uses Windows IIS. How can I translate the .htaccess to IIS, web.config?
Thank you!! -
AuthorPosts