Comments codeupdates started the conversationSeptember 22, 2017 at 7:25amI implement via child-theme and css my own font.Some Styles are in my font.But i see in the code, that wordpress is overwriting with body and open sans. <meta name="generator" content="WordPress 4.8.2"> body, textarea, #respond textarea, .widget input[type="text"], .widget input[type="email"], .widget input[type="date"], .widget input[type="number"], .wpcf7 textarea, .mc4wp-form input, #respond input, .wpcf7 input, #searchform input.search-input, ul.homepage-featured-boxes .penci-fea-in h4, .widget.widget_categories ul li span.category-item-count, .about-widget .about-me-heading, .widget ul.side-newsfeed li .side-item .side-item-text .side-item-meta { font-family: 'Open Sans', sans-serif; } How can i fix it?Thanks!My font css @font-face { font-family: "Meta 300"; src: url("fonts/Meta-light.eot?#iefix"); src: url("fonts/Meta-light.eot?#iefix") format("eot"), url("fonts/Meta-light.woff2") format("woff2"), url("fonts/Meta-light.woff") format("woff"), url("fonts/Meta-light.ttf") format("truetype"); font-weight: 300; font-style: normal; } @font-face { font-family: "Meta 300 italic"; src: url("fonts/Meta-light-italic.eot?#iefix"); src: url("fonts/Meta-light-italic.eot?#iefix") format("eot"), url("fonts/Meta-light-italic.woff2") format("woff2"), url("fonts/Meta-light-italic.woff") format("woff"), url("fonts/Meta-light-italic.ttf") format("truetype"); font-weight: 300; font-style: normal; } @font-face { font-family: "Meta 400"; src: url("fonts/Meta-regular.eot?#iefix"); src: url("fonts/Meta-regular.eot?#iefix") format("eot"), url("fonts/Meta-regular.woff2") format("woff2"), url("fonts/Meta-regular.woff") format("woff"), url("fonts/Meta-regular.ttf") format("truetype"); font-weight: 400; font-style: normal; } @font-face { font-family: "Meta 700"; src: url("fonts/Meta-bold.eot?#iefix"); src: url("fonts/Meta-bold.eot?#iefix") format("eot"), url("fonts/Meta-bold.woff2") format("woff2"), url("fonts/Meta-bold.woff") format("woff"), url("fonts/Meta-bold.ttf") format("truetype"); font-weight: 700; font-style: normal; } h1, h2, h3, h4, h5, h6, h2.penci-heading-video, #navigation .menu li a, .penci-photo-2-effect figcaption h2, .headline-title, a.penci-topbar-post-title, #sidebar-nav .menu li a, .penci-slider .pencislider-container .pencislider-content .pencislider-title, .penci-slider .pencislider-container .pencislider-content .pencislider-button, .author-quote span, .penci-more-link a.more-link, .penci-post-share-box .dt-share, .post-share a .dt-share, .author-content h5, .post-pagination h5, .post-box-title, .penci-countdown .countdown-amount, .penci-countdown .countdown-period, .penci-pagination a, .penci-pagination .disable-url, ul.footer-socials li a span, .widget input[type="submit"], .penci-sidebar-content .widget-title, #respond h3.comment-reply-title span, .widget-social.show-text a span, .footer-widget-wrapper .widget .widget-title, .container.penci-breadcrumb span, .container.penci-breadcrumb span a, .error-404 .go-back-home a, .post-entry .penci-portfolio-filter ul li a, .penci-portfolio-filter ul li a, .portfolio-overlay-content .portfolio-short .portfolio-title a, .home-featured-cat-content .magcat-detail h3 a, .post-entry blockquote cite, .post-entry blockquote .author, .tags-share-box.hide-tags.page-share .share-title, .widget ul.side-newsfeed li .side-item .side-item-text h4 a, .thecomment .comment-text span.author, .thecomment .comment-text span.author a, .post-comments span.reply a, #respond h3, #respond label, .wpcf7 label, #respond #submit, .wpcf7 input[type="submit"], .widget_wysija input[type="submit"], .archive-box span, .archive-box h1, .gallery .gallery-caption, .contact-form input[type=submit], ul.penci-topbar-menu > li a, div.penci-topbar-menu > ul > li a, .featured-style-29 .penci-featured-slider-button a, .pencislider-container .pencislider-content .pencislider-title, .pencislider-container .pencislider-content .pencislider-button, ul.homepage-featured-boxes .penci-fea-in.boxes-style-3 h4 span span, .pencislider-container .pencislider-content .pencislider-button, .woocommerce div.product .woocommerce-tabs .panel #respond .comment-reply-title, .penci-recipe-index-wrap .penci-index-more-link a, .footer-widget-wrapper .widget ul li, .penci-featured-cat-seemore a, .button-sidebar a, input::placeholder, textarea::placeholder{ font-family: 'Meta 700'!important; letter-spacing: 0.009rem!important; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale} } body, p, a.read-more, a.penci-btn-readmore, .container.penci-breadcrumb span a,.container.penci-breadcrumb span, div.side-item-text > div > a{ font-family: 'Meta 400'!important; letter-spacing: 0.009rem!important; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale} } div.grid-post-box-meta > span, span.side-item-meta, ul > li > div.side-item-text > span,.mandatory{ font-family: 'Meta 300'!important; font-size: 0.87rem!important; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale} } div.magcat-detail > h3 > a, div.side-item-text > h4 > a{ font-size: 1rem!important; line-height: 1.2rem!important; } 2,700PenciDesign repliedSeptember 22, 2017 at 8:01amHi,I see you're using !important; for your font-family: custom font CSS.So, the issues here aren't on this code: <meta name="generator" content="WordPress 4.8.2"> body, textarea, #respond textarea, .widget input[type="text"], .widget input[type="email"], .widget input[type="date"], .widget input[type="number"], .wpcf7 textarea, .mc4wp-form input, #respond input, .wpcf7 input, #searchform input.search-input, ul.homepage-featured-boxes .penci-fea-in h4, .widget.widget_categories ul li span.category-item-count, .about-widget .about-me-heading, .widget ul.side-newsfeed li .side-item .side-item-text .side-item-meta { font-family: 'Open Sans', sans-serif; }Please check your import fonts URL - Your fonts doesn't load.Best Regards,PenciDesigncodeupdates repliedSeptember 22, 2017 at 10:10amHi, i put the issues in the code.the font are loading but the generator is overwriting with open sans.Do you know what can i do?Thanks for your answer 2,700PenciDesign repliedSeptember 22, 2017 at 10:12amHi,Can you show me your site url to I can take a look?If your site is under construction, please send me your admin url and admin account ( username and password ) in a private reply. I will take it a look.Best Regards,PenciDesign1 Like codeupdates replied privatelycodeupdates repliedSeptember 22, 2017 at 10:36amI am working like thesemy fonts are here: Child-Theme > fontsScreenshotfont loading css:Child-Theme > meta-font.css @font-face { font-family: "Meta 300"; src: url("fonts/Meta-light.eot?#iefix"); src: url("fonts/Meta-light.eot?#iefix") format("eot"), url("fonts/Meta-light.woff2") format("woff2"), url("fonts/Meta-light.woff") format("woff"), url("fonts/Meta-light.ttf") format("truetype"); font-weight: 300; font-style: normal; } @font-face { font-family: "Meta 300 italic"; src: url("fonts/Meta-light-italic.eot?#iefix"); src: url("fonts/Meta-light-italic.eot?#iefix") format("eot"), url("fonts/Meta-light-italic.woff2") format("woff2"), url("fonts/Meta-light-italic.woff") format("woff"), url("fonts/Meta-light-italic.ttf") format("truetype"); font-weight: 300; font-style: normal; } @font-face { font-family: "Meta 400"; src: url("fonts/Meta-regular.eot?#iefix"); src: url("fonts/Meta-regular.eot?#iefix") format("eot"), url("fonts/Meta-regular.woff2") format("woff2"), url("fonts/Meta-regular.woff") format("woff"), url("fonts/Meta-regular.ttf") format("truetype"); font-weight: 400; font-style: normal; } @font-face { font-family: "Meta 700"; src: url("fonts/Meta-bold.eot?#iefix"); src: url("fonts/Meta-bold.eot?#iefix") format("eot"), url("fonts/Meta-bold.woff2") format("woff2"), url("fonts/Meta-bold.woff") format("woff"), url("fonts/Meta-bold.ttf") format("truetype"); font-weight: 700; font-style: normal; } h1, h2, h3, h4, h5, h6, h2.penci-heading-video, #navigation .menu li a, .penci-photo-2-effect figcaption h2, .headline-title, a.penci-topbar-post-title, #sidebar-nav .menu li a, .penci-slider .pencislider-container .pencislider-content .pencislider-title, .penci-slider .pencislider-container .pencislider-content .pencislider-button, .author-quote span, .penci-more-link a.more-link, .penci-post-share-box .dt-share, .post-share a .dt-share, .author-content h5, .post-pagination h5, .post-box-title, .penci-countdown .countdown-amount, .penci-countdown .countdown-period, .penci-pagination a, .penci-pagination .disable-url, ul.footer-socials li a span, .widget input[type="submit"], .penci-sidebar-content .widget-title, #respond h3.comment-reply-title span, .widget-social.show-text a span, .footer-widget-wrapper .widget .widget-title, .container.penci-breadcrumb span, .container.penci-breadcrumb span a, .error-404 .go-back-home a, .post-entry .penci-portfolio-filter ul li a, .penci-portfolio-filter ul li a, .portfolio-overlay-content .portfolio-short .portfolio-title a, .home-featured-cat-content .magcat-detail h3 a, .post-entry blockquote cite, .post-entry blockquote .author, .tags-share-box.hide-tags.page-share .share-title, .widget ul.side-newsfeed li .side-item .side-item-text h4 a, .thecomment .comment-text span.author, .thecomment .comment-text span.author a, .post-comments span.reply a, #respond h3, #respond label, .wpcf7 label, #respond #submit, .wpcf7 input[type="submit"], .widget_wysija input[type="submit"], .archive-box span, .archive-box h1, .gallery .gallery-caption, .contact-form input[type=submit], ul.penci-topbar-menu > li a, div.penci-topbar-menu > ul > li a, .featured-style-29 .penci-featured-slider-button a, .pencislider-container .pencislider-content .pencislider-title, .pencislider-container .pencislider-content .pencislider-button, ul.homepage-featured-boxes .penci-fea-in.boxes-style-3 h4 span span, .pencislider-container .pencislider-content .pencislider-button, .woocommerce div.product .woocommerce-tabs .panel #respond .comment-reply-title, .penci-recipe-index-wrap .penci-index-more-link a, .footer-widget-wrapper .widget ul li, .penci-featured-cat-seemore a, .button-sidebar a, input::placeholder, textarea::placeholder{ font-family: 'Meta 700'!important; letter-spacing: 0.009rem!important; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale} } body, p, a.read-more, a.penci-btn-readmore, .container.penci-breadcrumb span a,.container.penci-breadcrumb span, div.side-item-text > div > a, #respond textarea, .widget input[type="text"], .widget input[type="email"], .widget input[type="date"], .widget input[type="number"], .wpcf7 textarea, .mc4wp-form input, #respond input, .wpcf7 input, #searchform input.search-input, ul.homepage-featured-boxes .penci-fea-in h4, .widget.widget_categories ul li span.category-item-count, .about-widget .about-me-heading, .widget ul.side-newsfeed li .side-item .side-item-text .side-item-meta { font-family: 'Meta 400'!important; letter-spacing: 0.009rem!important; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale} } div.grid-post-box-meta > span, span.side-item-meta, ul > li > div.side-item-text > span,.mandatory{ font-family: 'Meta 300'!important; font-size: 0.87rem!important; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale} } div.magcat-detail > h3 > a, div.side-item-text > h4 > a{ font-size: 1rem!important; line-height: 1.2rem!important; } Style:Child-Theme > style.css /* = Load meta-font.css -------------------------------------------------------------- */ @import url("meta-font.css"); ...... codeupdates repliedSeptember 22, 2017 at 10:37amMy Functions.php in Child-Theme <?php /* Soledad child theme functions and definitions */ function penci_soledad_child_scripts() { wp_enqueue_style( 'penci-soledad-parent-style', get_template_directory_uri(). '/style.css' ); if( is_single() ) { wp_enqueue_style( 'penci-soledad-child-style', get_stylesheet_directory_uri(). '/print.css',array(),'20130821','print'); } if( is_page() ) { wp_enqueue_style( 'penci-soledad-child-style', get_stylesheet_directory_uri(). '/print.css',array(),'20130821','print'); } } add_action( 'wp_enqueue_scripts', 'penci_soledad_child_scripts' ); /* * All custom functions go here */ include( trailingslashit( get_stylesheet_directory() ). 'inc/widgets/lastest_post_widget2.php' ); include( trailingslashit( get_stylesheet_directory() ). 'inc/print-button/print-button.php' );--> codeupdates repliedSeptember 22, 2017 at 10:39amThanks for your support! :D 2,700PenciDesign repliedSeptember 22, 2017 at 11:10amHi,I just checked your site and as you can see here - Your CSS override to the CSS for font from theme.So, it's issues about your font doesn't load.Best Regards,PenciDesign1 Likecodeupdates repliedSeptember 22, 2017 at 11:10amI have fix the problem!it was a syntax error in the my fonts css Sign in to reply ...
I implement via child-theme and css my own font.
Some Styles are in my font.
But i see in the code, that wordpress is overwriting with body and open sans.
How can i fix it?
Thanks!
My font css
Hi,
I see you're using !important; for your font-family: custom font CSS.
So, the issues here aren't on this code:
Please check your import fonts URL - Your fonts doesn't load.
Best Regards,
PenciDesign
Hi, i put the issues in the code.
the font are loading but the generator is overwriting with open sans.
Do you know what can i do?
Thanks for your answer
Hi,
Can you show me your site url to I can take a look?
If your site is under construction, please send me your admin url and admin account ( username and password ) in a private reply. I will take it a look.
Best Regards,
PenciDesign
I am working like these
my fonts are here:
Child-Theme > fonts
Screenshot
font loading css:
Child-Theme > meta-font.css
Style:
Child-Theme > style.css
My Functions.php in Child-Theme
Thanks for your support! :D
Hi,
I just checked your site and as you can see here - Your CSS override to the CSS for font from theme.
So, it's issues about your font doesn't load.
Best Regards,
PenciDesign
I have fix the problem!
it was a syntax error in the my fonts css