I have added subtitle just below title of single posts using Advanced custom field in my site. I am trying to change the background of the text. Any suggestions will be appreciable.
I have added subtitle just below title of single posts using Advanced custom field in my site. I am trying to change the background of the text. Any suggestions will be appreciable.
plugins
advanced-custom-fields
Share
Improve this question
asked Oct 22, 2019 at 21:38
SK21SK211744 bronze badges2
Can anyone help out?
– SK21
CommentedOct 22, 2019 at 22:00
Hi user31225, welcome to WordPress Development. As a rule, the community considers questions about third-party plugins (such as the one you have asked about) off-topic so you might notice some down-votes and answers may be slow if they come at all. You can find out what questions are a good fit here. This looks like a CSS issue, have you looked into adding a style rule?
– Matthew Brown aka Lord Matt
CommentedOct 22, 2019 at 23:14
Add a comment
|
1 Answer
1
Reset to default
0
in chrome/firefox Right click on the text area in question and hit "Inspect Element"
You'll now be able to see the code of your site
Don't click anywhere else, just look at the highlighted code. Look for class="something possiblysomethingelse"
Find the something in the "quotes", just one of them. The spaces separate them if there is more than one. That is what's called the class of the element. You can use it to then add CSS style to it. Pick the one that is the most unique.
-Take that class and replace the word class in this code.
.class {
background-color: #045fff;
}
Add the code to your themes custom CSS field or your style.css of your child theme. If you're not using a CHILD theme, look it up. Otherwise your CSS changes will be erased after a theme update.
This will make the background color blue. You can change the 6 letters after the # symbol to make it different colors. You can find the hex color codes here: https://www.colorhexa/
By the way, when asking questions a link is always the most helpful so we can actually see the code using the same inspect element functionality.