Archived topic
Bold links in post articles
7 replies · Started by eastwood501 on December 21, 2021
Hi,
I am wanting to make all hyperlinks within a post article blow. I have been manually doing this for every link but its tedious when there are lots of links in many articles.
I have been applying the following css in the wordpress customizer but when I publish it does not change anything.
.single-post .inside-article .entry-content a {
font-weight: bold;
}
Futhermore, I only need to 'bold' the links within the post text container and not links in any other areas.
Do i need to create a 'hook' element of some sort and apply the css there and not the customizer?
I am not up to speed with hooks yet, and if so what is the 'hook' area?
I am using generatepress pro and generateblocks pro
Thanks in advance.
Hi there,
Your CSS should work, it should be added to customizer > additional CSS or your child theme's style.css file.
For the underline, you've had this CSS in your child theme, please remove them.
https://www.screencast.com/t/fZUsCTqrrF
Then change your CSS to:
.single-post .inside-article .entry-content a {
font-weight: bold;
text-decoration: underline;
}
If you add the CSS but it doesn't seem working, try add the CSS to the top of the CSS file to avoid errors from other CSS.
Let me know if this helps :)
Hi Ying,
Thanks for your solution.
Adding the CSS to the customizer didnt change anything. But also adding it to the styles.css of the child theme did, which is great!
However now there is an underline underneath the links that are now 'bold'.
How can i remove the underline the post article links, but keep the links in 'bold'.
Thanks in advance.
Hi there,
You can remove the text-decoration: underline; on the CSS so there's no underline on the links.
Hi, i figured it out now.
Marked as resolved.
Thanks.
No problem. Glad you got it sorted. :D
Hi sorry to ask another question.
But but apply the CSS below, also applies it to buttons within the post article. I only want the css to apply to the hyperlinks in the post and not buttons etc.
How can i exclude applying the css below on buttons in a post article.
.single-post .inside-article .entry-content a {
font-weight: bold;
text-decoration: underline;
}
Thanks.
Hi there,
try this instead:
.single-post .inside-article .entry-content p a {
font-weight: bold;
text-decoration: underline;
}