• Resolved Trin

    (@vbptrin)


    Hi everybody.

    I have a question about how to add the bold and italics to my text. When I post things, I use the buttons available but they do not do anything to my text. I was thinking I may have to add them specifically into my css because I am not using the fonts that originally came with my theme. My font is Raleway. Thanks!

Viewing 14 replies - 1 through 14 (of 14 total)
  • It could be the font you’re using, if you didn’t include the italic and bold styles. To test it, temporarily switch to a default, untouched theme like Twenty Fifteen and see if it works.

    Thread Starter Trin

    (@vbptrin)

    I didn’t include the italic and bold styles..How would I go about doing that? I tried doing it the same way I did the normal version, but it isn’t working.

    How did you try doing it? It’s probably easiest to do with a plugin like this: https://www.ads-software.com/plugins/wp-google-fonts/

    David_G

    (@questas_admin)

    Try out Tiny MCE Advanced plugin.

    Thread Starter Trin

    (@vbptrin)

    mindctrl: I had followed the instructions that Google fonts had given me, which had worked when I originally put the font into my website. Adding the bold version didn’t do anything, though.

    I got that plugin, but how would I set it so that it would bold specific things in my posts and pages? When I choose to assign the elements to all body tags, it changes the fonts to my lowest set font style.( i.e. when I choose light and medium, it changes everything to light.) But when I choose anything above a medium, it goes back to medium. Medium was the one I implanted into my style.css at the beginning of building this website…

    Thread Starter Trin

    (@vbptrin)

    questas_admin: I searched for the plugin but it did not show up. I see TinyMCE Annotate..is that what you mean?

    Thread Starter Trin

    (@vbptrin)

    Questas_admin: Aha! I found it. I’ll try it out and see how it does. Thank you.

    Thread Starter Trin

    (@vbptrin)

    questas_admin: It does not have my font to choose from, but it does seem pretty helpful for other things. Thank you!

    David_G

    (@questas_admin)

    If you have a child-theme setup, you can add google font’s that you choose in the functions.php file then manually change to those fonts in your text editor. In the example below I have 5 fonts, Playball, Dosis, Raleway, Orbitron, and Tangerine. I do it this way instead of using a plugin.

    // Add Google Font
    add_action( 'wp_enqueue_scripts', 'my_google_font' );
    function my_google_font() {
        wp_enqueue_style( $handle = 'my-google-font', $src = 'https://fonts.googleapis.com/css?family=Playball|Dosis|Raleway|Orbitron|Tangerine', $deps = array(), $ver = null, $media = null );
    }

    You can then use those fonts in your pages/posts and use them for styling css.

    Thread Starter Trin

    (@vbptrin)

    Okay, I just copied and pasted what you have into my functions.php file to see what it would do, and it has made my whole page go white. Like, I literally can not go to even the dashboard because it’s all white. So is my website. I tried just going back and just deleting it from my functions.php, but when I press save changes it still goes white. :0 I try to refresh it and it says that it needs to resend the information…I press resend and it still stays white. What happened???!

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Did you create a Child Theme?

    Thread Starter Trin

    (@vbptrin)

    Never mind, my coworker and I got it fixed. ??

    Okay, so once I place this into the functions.php, how can I edit the text in the pages?

    Thread Starter Trin

    (@vbptrin)

    Thank you guys for the help! I found out that I just had to delete “strong” and “em” from

    html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, font, ins, kbd, q, s, samp, small, strike, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
    	border: 0;
    	font-family: inherit;
    	font-size: 100%;
    	font-style: inherit;
    	font-weight: inherit;
    	margin: 0;
    	outline: 0;
    	padding: 0;
    	vertical-align: baseline;

    So for people reading this in the future….That might be your problem. ^^’

    David_G

    (@questas_admin)

    The easiest way to change it in your text is to add another font, go to your text editor and change it to raleway there. Or if you want the default to be raleway you can do that in your child theme style.css file.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘How to bold and italicize text’ is closed to new replies.