• Resolved Royah Marie

    (@hautecreations)


    Hello. I just added the CSS code below to change the font to my entire website (I am using the Storefront theme). After thinking about it, I would like my Page Title and Headings to be Edwardian Script and the remaining font everywhere else to only be century gothic since this font combination matches my brand. Here is my current code. Can someone please help me edit this/clean it up? It seems excessive. Thank you in advance!

    body,
    .entry-content,
    .entry-content p,
    .entry-content ol,
    .entry-content ul,
    .widget_text p,
    .widget_text ol,
    .widget_text ul,
    .widget-content .rssSummary,
    .comment-content p,
    .entry-content .wp-block-latest-posts__post-excerpt,
    .entry-content .wp-block-latest-posts__post-full-content,
    .has-drop-cap:not(:focus):first-letter,
    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    .entry-content h1,
    .entry-content h2,
    .entry-content h3,
    .entry-content h4,
    .entry-content h5,
    .entry-content h6,
    .faux-heading,
    .site-title,
    .pagination-single a,
    ul.primary-menu,
    ul.modal-menu,
    .intro-text,
    input,
    textarea,
    select,
    button,
    .button,
    .faux-button,
    .wp-block-button__link,
    .wp-block-file__button,
    .entry-content .wp-block-file,
    .primary-menu li.menu-button>a,
    .entry-content .wp-block-pullquote,
    .entry-content .wp-block-quote.is-style-large,
    .entry-content .wp-block-quote.is-style-tw-large-icon,
    .entry-content cite,
    .entry-content figcaption,
    .wp-caption-text,
    .entry-content .wp-caption-text,
    .widget-content cite,
    .widget-content figcaption,
    .widget-content .wp-caption-text,
    .entry-categories,
    .post-meta,
    .comment-meta,
    .comment-footer-meta,
    .author-bio,
    .comment-respond p.comment-notes,
    .comment-respond p.logged-in-as,
    .entry-content .wp-block-archives,
    .entry-content .wp-block-categories,
    .entry-content .wp-block-latest-posts,
    .entry-content .wp-block-latest-comments,
    p.comment-awaiting-moderation,
    .pagination,
    #site-footer,
    .widget:not(.widget-text),
    .footer-menu,
    label,
    .toggle .toggle-text {
    	font-family: "Century Gothic", CenturyGothic, AppleGothic, sans-serif;

    The page I need help with: [log in to see the link]

Viewing 14 replies - 1 through 14 (of 14 total)
  • Hi there!

    Thank you for contacting us!

    I understand you’d like to clean up the CSS code you’ve applied to change the fonts of your website.

    You can try the simplified CSS below:

    
    body, button, input, textarea, select{
    // Add CSS for Century Gothic
    }
    
    h1, h2, h3, h4, h5, h6{
    // Add CSS for Edwardian Script
    }
    

    I hope this helps! ??

    Thread Starter Royah Marie

    (@hautecreations)

    Thank you! The part for century gothic worked perfectly but it did not work for Edwardian Script. Any thoughts as to why? The CSS I am using is font-family.

    Hi there!

    This could be due to a number of reasons, but I’d say that most likely your CSS is missing the @font-face rule, in which you specify where that font is to be found on your site. The rule should look like this:

    
    @font-face {
        font-family: "Edwardian Script";
        src: url(path/to/the/font);
    }
    

    You must replace path/to/the/font with the path to the font file on your site or an external repository

    Note that the process of changing elements via CSS differs from site to site. If the information above doesn’t help, please provide a link to your site, and we will be able to assist further.

    Thread Starter Royah Marie

    (@hautecreations)

    @hegenberg Thank you so very much. I have a question, as I’m not as tech savvy as I wish I were. So if I add my font files to my webserver (Bluehost) file manager folders, I don’t know how to enter that as the URL/file location. So in my directory I can see the path folders is /home/hautecr2/fonts

    Is that what I would enter as a path?

    Hey @hautecreations,

    I don’t know how to enter that as the URL/file location. So in my directory I can see the path folders is /home/hautecr2/fonts
    Is that what I would enter as a path?

    Ideally, yes, that’d be the path you need to add there. However, as we do not have access to your hosting area I am not sure that’d work.

    Many hosts have an option to copy the file URL from the dropdown list you get after right-clicking on it. Can you please check if you have this option?

    You can also reach out to your host to get the URL path to the font file.

    Please do let us know how it goes!

    Thread Starter Royah Marie

    (@hautecreations)

    @sandipmondal I don’t have the ability to copy the file location URL. I’m going to ask Bluehost. I’ll be back with more info!

    Thread Starter Royah Marie

    (@hautecreations)

    @hegenberg I tried to add this CSS specifying the path and it still did not work. I added it as additional CSS and in the theme editor I added it to the beginning of the code (after the theme introduction verbiage and NOT at the same time as when I added it as additional CSS) and still nothing. My site is https://www.creationsbyroyah.com.

    Thread Starter Royah Marie

    (@hautecreations)

    @sandipmondal After speaking with bluehost they told me the URL is (/home4/hautecr2)
    >> public_html>> wp-content>> themes >> storefront >> assets >> fonts

    I confirmed it, twice and she assured me this was correct. I was reading the article here: https://themeisle.com/blog/custom-fonts-wordpress/ and according to this, it should be https://www.www.creationsbyroyah.com/wp-content/themes/storefront/assets/fonts/Edwardian Script.ttf (based on where I placed the new font). What are your thoughts?

    Either way I’ve tried them both and I can’t get it to work. Maybe I’m putting it in the wrong place?

    • This reply was modified 2 years, 6 months ago by Royah Marie.

    Hi @hautecreations

    It seems that your typeface file name has a blank space in it, which can cause issues. Please rename it to Edwardian-Script.ttf

    The path to your file should then read as follows:
    /wp-content/themes/storefront/assets/fonts/Edwardian-Script.ttf

    Hope that helps!

    Thread Starter Royah Marie

    (@hautecreations)

    Still nothing. Maybe I’m putting it in the wrong place. The stylesheet for this theme is seemingly disorganized; or maybe I’m just tired or reading it.

    Hi @hautecreations

    I understand that the CSS code is still not working on your end.

    Can you please share with us here the whole CSS code you are using so we can check it further?

    Looking forward to your reply.

    Thread Starter Royah Marie

    (@hautecreations)

    Sorry all. I got so frustrated with the theme that I changed the theme from Storefront to something else. Applying the Century Gothic was not a problem because I didn’t have to install the font. Here where I am at with the additional CSS.

    img.custom-logo {
    max-height: 400 !important;
    }
    img.custom-logo {
    max-width: 500px !important;
    }
    .site-header {
    padding-top: 20px;
    }
    .site-footer {
    padding-top: -20;
    }
    .site-footer {
    padding-bottom: 0;
    }
    .site .entry-header {
    display: none;
    }
    body, button, input, textarea, select{ font-family: Century Gothic
    }
    h1, h2, h3, h4, h5, h6{ font-family: Century Gothic
    }
    input,
    select,
    textarea,
    .hentry .entry-content .wp-block-button .wp-block-button__link,
    a.button,
    a.button:visited,
    button,
    html input[type=button],
    input[type=reset],
    input[type=submit],
    .woocommerce #respond input#submit,
    .woocommerce a.button,
    .woocommerce button.button,
    .woocommerce input.button {
    border-radius: 20px;
    }
    a.wp-block-button__link.add_to_cart_button.ajax_add_to_cart {
    border-radius: 15px;
    }`

    Thread Starter Royah Marie

    (@hautecreations)

    Fixed it!!! Thank you. I was not understanding to ALSO add

    @font-face {
    font-family: “Edwardian Script”;
    src: url(path/to/the/font);
    }

    con

    (@conschneider)

    Engineer

    Thank you for sharing your solution here, much obliged. ??

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Page Title and Heading different font from rest of site’ is closed to new replies.