Home Forums WoodMart support forum Change theme font

Change theme font

Viewing 21 posts - 1 through 21 (of 21 total)
  • Author
    Posts
  • #32425

    Hosein Vahhabi
    Participant

    Hello

    How can I changing all Text font to persian “IRANSans”?
    IranSans does not exist in theme setting typography. in that list only google font exist.

    #32463

    Artem Temos
    Keymaster

    Hi,

    Unfortunately, there is no option to upload custom fonts in our Theme Settings. Here is an article that should help you upload and use your custom fonts with a bit of additional code customization https://premium.wpmudev.org/blog/custom-fonts-css/

    Regards

    #32595

    Hosein Vahhabi
    Participant

    based on course video in lynda.com named
    I upload my font with fontiran.css in its folder that introduce All font style and weight and format.
    then add this code in function.php in woodmart child
    wp_enqueue_style( 'child-IRANSans', get_stylesheet_directory_uri() . '/fonts/IRANSans/fontiran.css', array('bootstrap') );
    and this to style.css in woodmart-child

    * {
    	font-family: IRANSans !important;
    }
    body {
    	font-family: IRANSans !important;
    	font-weight: 300;
    	direction: rtl;
    	background-color: #E2E2E2;
    	margin: 0;
    }
    h1, h2, h3, h4, h5, h6,input, textarea {
    	font-family: IRANSans !important;
    }

    but tow issue produced
    1. the font icon missed.
    2. the fonts does not properly load. and home page time load increased very much.
    can you help me to implement standard and minify way to add font?
    or intruduced me shortcode in child style css add to override font on all text in my site exclude font icon?

    #32602

    Artem Temos
    Keymaster

    Are you able to provide us your admin and FTP access so we can check it?

    Thank you

    #32635

    Hosein Vahhabi
    Participant

    hello
    yes it’s OK.

    #32653

    Artem Temos
    Keymaster

    Sorry, but we can’t connect with this FTP data. But we also don’t see fonts files uploaded to the child theme. Check this for example http://www.aventstore.ir/wp-content/themes/woodmart-child/fonts/ttf/IRANSansWeb.ttf

    #32682

    Hosein Vahhabi
    Participant

    in woodmart-child/fonts/… all version of font exists.
    you can try the import configuration filezila ftp in private content.

    #32720

    Artem Temos
    Keymaster

    Sorry, but we still can’t connect https://gyazo.com/77d001e2ba46ed85b9442ad5b3a27daa
    We see the following errors in your JS console that means that your fonts files can’t be found https://gyazo.com/fba215ced4bc5a2ebc8f7a485a8aa4c5

    Are you able to check the FTP or gives some other way to connect to your theme files? Or you can try to upload your custom fonts using some extra plugin like this one https://wordpress.org/plugins/use-any-font/

    #33228

    Hosein Vahhabi
    Participant

    Hello
    iransans font files exist in directory theme/woodmar/woodmart-child/font/iransans/..
    and with new FTP account after cheking the box to accept the unusual certificate when say “host name does not match certificate” you can access and see this files.
    but i dont understand why my font does’ not recognize and load.

    I dont use that pluging because plugins slow down page speed
    I following to optimize method that dont affect my page speed
    thanks for attention

    #33229

    Hosein Vahhabi
    Participant

    the xml file

    #33248

    Artem Temos
    Keymaster

    Hello,

    Sorry, but we still can’t access and get an error in the FileZilla. Maybe you can give us your hosting control panel access?

    Your fonts should be in the following locations:

    http://www.aventstore.ir/wp-content/themes/fonts/woff2/IRANSansWeb_Bold.woff2
    http://www.aventstore.ir/wp-content/themes/fonts/woff2/IRANSansWeb.woff2

    check your error console and you will see those errors https://gyazo.com/54b1859976e2d2721f49a6d2cbd0dbd7

    Regards

    #33290

    Hosein Vahhabi
    Participant

    I send the hosting control access. please fit the issue.

    #33297

    Artem Temos
    Keymaster

    OK, we have moved the font to the right location. Now you need to add the following CSS code

    .font-text, body, .menu-label, .menu-item-register .create-account-link, .wpb-js-composer .vc_tta.vc_general.vc_tta-style-classic.vc_tta-accordion .vc_tta-panel-title, .widgetarea-mobile .widget_currency_sel_widget .widget-title, .widgetarea-mobile .widget_icl_lang_sel_widget .widget-title, .woodmart-hover-base .hover-content table th, .woocommerce-product-details__short-description table th,
    #order_review_heading, #ship-to-different-address label, .cart-empty, .cart-totals-inner h2, .font-primary, .masonry-filter li, .menu-mega-dropdown .sub-menu>li>a, .page-title h1, .register-or, .social-login-title, .tabs-layout-tabs .tabs li, .title, .widget_rss ul li>a, .wishlist-title h2, .woocommerce-MyAccount-title, .woocommerce-Reviews .comment-reply-title, .woocommerce-additional-fields>h3, .woocommerce-billing-fields>h3, .woocommerce-column__title, .woocommerce-shipping-fields>h3, .woodmart-accordion-title, .woodmart-checkout-steps ul, .woodmart-price-table .woodmart-plan-title, .woodmart-products-tabs .products-tabs-title, .woodmart-products-tabs .tabs-name, .woodmart-sizeguide-table tr:first-child td, .wpb-js-composer .vc_tta.vc_general.vc_tta-style-classic.vc_tta-tabs .vc_tta-tab>a, body>h1, h1, h2, h3, h4, h5, h6, header.title>h3, legend, table th, table.compare-list tr.no-products td,
    #order_review_heading, #ship-to-different-address label, .cart-empty, .cart-totals-inner h2, .font-primary, .masonry-filter li, .menu-mega-dropdown .sub-menu>li>a, .page-title h1, .register-or, .social-login-title, .tabs-layout-tabs .tabs li, .title, .widget_rss ul li>a, .wishlist-title h2, .woocommerce-MyAccount-title, .woocommerce-Reviews .comment-reply-title, .woocommerce-additional-fields>h3, .woocommerce-billing-fields>h3, .woocommerce-column__title, .woocommerce-shipping-fields>h3, .woodmart-accordion-title, .woodmart-checkout-steps ul, .woodmart-price-table .woodmart-plan-title, .woodmart-products-tabs .products-tabs-title, .woodmart-products-tabs .tabs-name, .woodmart-sizeguide-table tr:first-child td, .wpb-js-composer .vc_tta.vc_general.vc_tta-style-classic.vc_tta-tabs .vc_tta-tab>a, body>h1, h1, h2, h3, h4, h5, h6, header.title>h3, legend, table th, table.compare-list tr.no-products td {
    	font-family: IRANSans;
    }
    
    #33306

    Hosein Vahhabi
    Participant

    I inset the code to the child-theme style.css
    the font properly load but not assign to the page’s text.
    can you check the issue?
    thanks a lot.

    #33310

    Artem Temos
    Keymaster

    Could you please try this code snippet?

    .font-text, .menu-item-register .create-account-link, .menu-label, .widgetarea-mobile .widget_currency_sel_widget .widget-title, .widgetarea-mobile .widget_icl_lang_sel_widget .widget-title, .woocommerce-product-details__short-description table th, .woodmart-hover-base .hover-content table th, .wpb-js-composer .vc_tta.vc_general.vc_tta-style-classic.vc_tta-accordion .vc_tta-panel-title, body {
        font-family: IRANSans!important;
    }
    
    .font-primary, .page-title h1, table th, .woodmart-products-tabs .tabs-name, .woodmart-products-tabs .products-tabs-title, .woodmart-price-table .woodmart-plan-title, .masonry-filter li, .woocommerce-column__title, header.title > h3, .woodmart-sizeguide-table tr:first-child td, .tabs-layout-tabs .tabs li, .woodmart-accordion-title, .woodmart-checkout-steps ul, .woocommerce-billing-fields > h3, .woocommerce-shipping-fields > h3, .woocommerce-additional-fields > h3, #ship-to-different-address label, #order_review_heading, .cart-empty, .cart-totals-inner h2, .social-login-title, .register-or, .woocommerce-MyAccount-title, .wpb-js-composer .vc_tta.vc_general.vc_tta-style-classic.vc_tta-tabs .vc_tta-tab > a, .wishlist-title h2, body > h1, table.compare-list tr.no-products td, #order_payment_heading, .widget_rss ul li > a, h1, h2, h3, h4, h5, h6, .title, legend, .woocommerce-Reviews .comment-reply-title, .menu-mega-dropdown .sub-menu > li > a, .mega-menu-list > li > a, .color-scheme-light .mega-menu-list>li>a {
        font-family: IRANSans!important;
    }
    
    .category-grid-item .category-title, .blog-post-loop .entry-title, .post-single-page .entry-title, .single-post-navigation .post-title, td.product-name a, .product-image-summary .entry-title, .woodmart-menu-price .menu-price-title, .product-title, .product-grid-item .product-title, .group_table td.label a, table.compare-list tr.title td, .widget_recent_entries ul li a, .widget_recent_comments ul li > a, .woodmart-recent-posts .entry-title a, .widget_recent_reviews li a, .yith-woocompare-widget .products-list li
    a.title {
        font-family: IRANSans!important;
    }
    #33323

    Hosein Vahhabi
    Participant

    It’s solved, Thank a lot.

    #33326

    Artem Temos
    Keymaster

    Great, you are welcome!

    #34746

    Hosein Vahhabi
    Participant

    hello again
    font of the header main menu does not changed yet!

    #34766

    Artem Temos
    Keymaster

    Use the following CSS code also

    .main-nav-style, .main-nav .item-level-0 > a, .main-nav .menu > .menu-item-language > a, body:not(.global-full-screen-menu) .woodmart-header-links > ul > li > a, .full-screen-nav .item-level-0 > a, .full-screen-nav .menu > .menu-item-language > a {
        font-family: IRANSans!important;
    }
    #34829

    Hosein Vahhabi
    Participant

    thanks, it’s solved.

    #34869

    Bogdan Donovan
    Keymaster

    You are welcome!

Viewing 21 posts - 1 through 21 (of 21 total)

The topic ‘Change theme font’ is closed to new replies.