• johannes999

    (@johannes999)


    Hallo,
    I have this code in function.php for google-fonts:

    
    function auto_garage_add_google_fonts() {
     
    wp_enqueue_style( 'auto-garage-google-fonts','https://fonts.googleapis.com/css2?family=Ravi+Prakash&family=Roboto:wght@300&display=swap',array(), null );
    }
    add_action( 'wp_enqueue_scripts', 'auto_garage_add_google_fonts' ); 
    

    and I have inserted in extra CSS this code:

    
    p {
    	font-family: 'Roboto', sans-serif;
    	font-size:14px;
    	line-height: 1.5;
    	color:red;
    	
    }
    

    but it is working under the home page only on the first section and the rest of the page and other pages stays unchangeable.
    I looked every place for a clue but I couldn’t find anything.
    what it can be the problem?
    thanks

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Michael

    (@alchymyth)

    you are formatting the paragraph tag only; any other elements will not get that new font.

    add more CSS to target whatever other elements you want to have with the ‘roboto’ font.

    try working with the browser inspection tools to find the relevant CSS selectors.

    Thread Starter johannes999

    (@johannes999)

    thanks for your advise,
    I am working with Bootstrap 4 I wil check every thing tomarrow and let you know .
    thanks again

    Thread Starter johannes999

    (@johannes999)

    hallo,
    I have inspected with inspect elements in chrome and found that I have to ad this code in extra CSS:

    
    body {
    		font-family: 'Roboto', sans-serif;
    
    	font-size:15px;
    	line-height: 1.5;
    	color:#262626;	
    	
    }
    

    and it works.
    thanks again

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘I inserted google-fonts on my web page but it is not working?’ is closed to new replies.