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. subtitle area created by advanced custom field plugin

  • Can anyone help out? – user31225 Oct 22 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 Oct 22 at 23:14
  • 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.com/

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.