Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1364596

    jerrykong
    Participant

    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

    #1364775

    Jade
    Moderator

    Hi 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.

    #1365506

    jerrykong
    Participant

    Please 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!

    #1365590

    Rupok
    Member

    Hi 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!

    #1365999

    jerrykong
    Participant

    Where 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

    #1366286

    Jade
    Moderator

    Hi 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 credentials

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    #1366406

    jerrykong
    Participant
    This reply has been marked as private.
    #1366777

    Rad
    Moderator

    Hi 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!

    #1370544

    jerrykong
    Participant

    Thanks 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

    #1370707

    Jade
    Moderator

    Hi 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.

    #1370882

    jerrykong
    Participant

    Thanks 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?

    #1371394

    Rupok
    Member

    Hi there,

    That sounds unusual. Can you show us some screenshot?

    Thanks!

    #1379152

    jerrykong
    Participant

    Attached … Please check …

    #1379376

    Christopher
    Moderator

    Hi 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.

    #1398591

    jerrykong
    Participant

    Thanks for your reply. Our hosting uses Windows IIS. How can I translate the .htaccess to IIS, web.config?
    Thank you!!