CSS in Chid Theme

Hello!

congrats, the theme is wonderful.
I’m having just a problem. I’m trying to change some colors in a child theme, but I just can’t override the parent styles. I’m using this function:

<?php
add_action( ‘wp_enqueue_scripts’, ‘my_theme_enqueue_styles’ );
function my_theme_enqueue_styles() {

wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'child-style',
    get_stylesheet_directory_uri() . '/style.css',
    array( $parent_style ),
    wp_get_theme()-&gt;get('Version')
);

}
?>

Please, help!
Thanks a lot.

Hey there,
I hope you’re doing well today

To make things easier for you, may I suggest the use of this plugin to create the child theme?

Best Regards,
Support

Hello!

thanks for supporting me. I used the Child Theme Plugin, which is very nice by the way, but I still having much difficulty to override de css code. I just want to change some colors and that’s all, but even adding “!important”, some colors don’t change.

I’m not a expert programmer, I must say. Do you have any suggestion?

thanks again.
SP

Hello there,

Thanks for that informtion.

In order to change the colors in the theme you would need to add some new css code to Appearance > Customize > Additional CSS.

Could you provide a link and tell me what colors you want changed?

Best Regards,
Support

Hello again!

I’m still working on a localhost, but I finally could change the colors by adding additional CSS. Thanks a lot. Now I’m wondering how to remove the dark filter of the slider. I’d prefer the opposite: images getting darker after hover…

Is it possible?

Thanks again!
SP

Glad you got it working.

You can try achieving this by adding the following CSS code in the Custom CSS option of your theme on the below path.

Admin Area -> Appearance -> Customize -> Additional CSS

/*remove overlay*/
.newspaper-x-recent-posts > ul > li#newspaper-x-recent-post-0:after,.newspaper-x-recent-posts > ul > li#newspaper-x-recent-post-1:after, .newspaper-x-recent-posts > ul > li#newspaper-x-recent-post-2:after {
  background: rgba(0, 0, 0, .0);
}

/*overlayon hover*/
.newspaper-x-recent-posts > ul > li#newspaper-x-recent-post-0:hover:after,.newspaper-x-recent-posts > ul > li#newspaper-x-recent-post-1:hover::after, .newspaper-x-recent-posts > ul > li#newspaper-x-recent-post-2:hover:after {
  background: rgba(0, 0, 0, .20);
}

Also for your local development, you can look into local by flywheel Works great. (especially on mac)

Best Regards,
Support

Hello!

first of all, thank you for your valuable assistant.
One more problem: on mobile, the titles h1 and h6 are getting the link color. I’d prefer white for an easy reading over images. I’ve already tried to change de css on h1 and h5 and I can’t obviously put the a { on white. What should I do?

Thanks again!
SP

I did it!

.newspaper-x-recent-posts > ul > li .newspaper-x-post-info a {
color: #FFF; }
thanks,
:slight_smile:

Awesome!

Glad you got it sorted out.

Please let us know if you have anything else we can assist you with.

Best Regards,
Support.

Actually, just one more question:
is it possible to add a login form (ou a link) in the top header area?

thank you again!
SP

@sanperta

Unfortunately, this is considered an advanced customization request and is beyond the scope of support provided.
This will require modification of files and CSS.

If you are not a developer then you can consider customizations offered by Envato,
https://colorlib.com/out/envatostudio.

Best regards,
Support.