Okay
  Public Ticket #199013
Changing Font Size and Color
Closed

Comments

  • Waitsel started the conversation

    What is the easiest, quickest way to change the BODY COPY size and color. I don't want to change the font, just the size and color; and I only want to change them for the body copy. Thanks!

  •  1,075
    ThemeNectar replied

    Hey Waitsel,

    Add this into the custom css box in your Salient options panel:

    body .main-content {
      color: #000;
      font-size: 14px;
      line-height: 24px;
    }
    

    Cheers :)

  • Aude replied

    Hi,

    I would like to increase the general size of the body font. I tried the solution above, as well as using the Typography options in the Salient theme Settings, but without result.

    When I use a code inspector, I still see body{font-size:12px ...} on line 153 of the css file.

    Could you help ?

  •  8,848
    Tahir replied

    Hey Aude!

    Can you provide your site url so we can have a look at why the css is not working.

    Thanks


    ThemeNectar Support Team 

  • Aude replied

    Hi Tahir,

    My website is not yet online. I made a printscreen of the Code inspecteur css content when clicking on a text boxed on the homepage (see attachment).

    Can it help?


  • Aude replied

    Hi again,

    I think I have found the problem, but would really appreciate your help for the solution, since I am not a developper.

    What I didn't mention previously: I use a child theme, and imported only the style.css stylesheet of the salient parent theme, not all the other stylesheets - which explains that the styling via the Salient settings didn't work.

    I saw on http://codex.wordpress.org/Child_Themes that the correct method of enqueuing the parent theme stylesheet is to use wp_enqueue_script() in the child theme's functions.php.

    add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
    function theme_enqueue_styles() {
     wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
    }
    

    Since Salient has many different stylesheets, could you tell me which syntax I can use to correctly enqueue all the css files ?

    Now, I am getting the following error message on the Salient settings page : "Warning: file_put_contents(C:\xampp\apps\wordpress\htdocs/wp-content/themes/salient-child/css/dynamic-combined.css): failed to open stream: No such file or directory in C:\xampp\apps\wordpress\htdocs\wp-content\themes\salient\functions.php on line 548"

    How can I tell to Salient Child that the file is in the parent theme, not in the child theme ?

    Thanks in advance,


  • Aude replied

    I tried to enque all the Salient css files,

    function theme_enqueue_styles() {
    wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
    wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/ascend.css' );
    wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/dynamic-combined.css' );
    wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/font-awesome.min.css' );
    wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/ie8.css' );
    wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/linecon.css' );
    //wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/mediaelementplayer.min.css' );
    }
    add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );

    but the style chosen on Salient theme configuration still does not apply correctly (ex: accent color does not change).

    I really need help on this,

    Thanks in advance,

  •  1,075
    ThemeNectar replied

    Hey, you need to dequeue the parent theme stylesheets first, and also use get_stylesheet_directory_uri instead of get_template_directory_uri.

    Check this out for a tutorial on the doing it with scripts, stylesheets are basically the same: https://themenectar.ticksy.com/ticket/136919/search/

  • Aude replied

    Hi ThemeNectar,


    Thanks a lot for your help! However, I still cannot get it working, could you check my syntax below? In the script example, there is only one file, so I do not right understand if I have to dequeue and then enqueue all the parent css or only some.

    add_action( 'wp_enqueue_scripts', 'css_init_style');
    function css_init_style() {
    wp_dequeue_style( 'style.css' );
    wp_dequeue_style( 'css/ascend.css' );
    wp_dequeue_style( 'css/dynamic-combined.css' );
    wp_dequeue_style( 'css/font-awesome.min.css' );
    wp_dequeue_style( 'css/ie8.css' );
    wp_dequeue_style( 'css/linecon.css' );
    wp_dequeue_style( 'css/mediaelementplayer.min.css' );
    wp_enqueue_style( 'salient-child', get_stylesheet_directory_uri() .'./style.css' );
    wp_enqueue_style( 'parent-style', get_template_directory_uri() . './style.css' );
    //wp_enqueue_style( 'parent-style', get_template_directory_uri() . 'ascend.css' );
    //wp_enqueue_style( 'parent-style', get_template_directory_uri() . 'dynamic-combined.css' );
    //wp_enqueue_style( 'parent-style', get_template_directory_uri() . 'font-awesome.min.css' );
    //wp_enqueue_style( 'parent-style', get_template_directory_uri() . 'ie8.css' );
    //wp_enqueue_style( 'parent-style', get_template_directory_uri() . 'linecon.css' );
    //wp_enqueue_style( 'parent-style', get_template_directory_uri() . 'mediaelementplayer.min.css' );
    } Thanks in advance,
  •  8,848
    Tahir replied

    Hey!

    Please see screenshot: http://prntscr.com/68tf4v . To dequeue the css file you will have to write the "handle" eg for style.css it is "main-styles" .

    Thanks


    ThemeNectar Support Team 

  • Aude replied

    Hi,


    Thanks a lot!

    I tried using "register" the styles and using then the "handle", but it is still not ok.

    Actually, regarding the number of stylesheet in Nectar, I do not know which ones I have to "dequeue" and the "enqueue", and in which order. I tried different solutions, but without success.

    add_action( 'wp_enqueue_scripts', 'css_init_style');
    function css_init_style() {
    wp_dequeue_style( 'main-styles' );
    wp_dequeue_style( 'skin-ascend' );
    wp_dequeue_style( 'dynamic-css' );
    wp_dequeue_style( 'font-awesome' );
    wp_dequeue_style( 'nectar-ie8.css' );
    wp_dequeue_style( 'linecon.css' );
    wp_dequeue_style( 'mediaelementplayer.min.css' );

    wp_register_style('salient-child', get_stylesheet_directory_uri() . './style.css' );
    wp_register_style( 'parent-style', get_template_directory_uri() . './style.css' );

    wp_enqueue_style( 'salient-child' );
    wp_enqueue_style( 'parent-style' );
    }

    Could you help me further?

    Thanks a lot again,


  •  8,848
    Tahir replied

    Hey Aude!

    Please create a new private ticket with your login credentials so that we can have a look.

    Thanks


    ThemeNectar Support Team