Child theme and nothing happened

Hello

I followed the post indicated with the parameters to insert text in the recent posts. I already inserted the indicated part of the code in the functions.php within the child theme and nothing happened. Could you suggest where I might have gone wrong?

thank you

Hi,

Please provide us your site url as well.

Thanks

Hi, gee … what’s wrong with me!

fernandoadams.com.br

Hi There,

I could see that you’d already installed the X child theme but didn’t activate it yet.

Please activate the child theme under this link: https://www.fernandoadams.com.br/wp-admin/themes.php.

Regards!

Thank you,

God, I can not believe I did not think of that. I looked for more complicated alternatives and in the end it was simple.

Now it’s working … but I realized that the texts also appear in the portifolio area … I would like to have the texts only in the area of recent news.

Another thing, I’m trying to edit colors, spacing and sizes via css through themes / x-child / style.css - am I right?

Could you help me on the way to resolve these issues?

Hi There,

You can hide the portfolio’s custom excerpt with the following custom CSS.

.x-recent-posts .type-x-portfolio .x-recent-posts-excerpt {
	display: none;
}

You can style the recent post title and recent posts custom excerpt with this custom CSS.

/*for recent posts title*/
.h-recent-posts {
	color: red;
	font-size: 14px;
	line-height: 1;
}

/*for recent posts custom excerpt*/
.x-recent-posts-excerpt > p {
	color: blue;
	font-size: 12px;
	line-height: 1;
}

Yes, you can place custom CSS on the child theme’s style.css file or Theme Options > CSS

Hope it helps,
Cheers!

Thanks for the help.

Unfortunately I succeeded only by editing the CSS in the Theme Options> CSS … When I insert custom CSS into the child theme’s style.css file it does not work.

Can think of something to show me the way.

Hi there,

When adding CSS in style.css, you need to add !important. Example,

.x-recent-posts .type-x-portfolio .x-recent-posts-excerpt {
	display: none !important;
}

This tells the browser to honor it even if there are other loaded CSS.

Thanks!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.