Site logo

Archived topic

Read Theme - Anchor text - Admin URL

7 replies · Started by Amit on June 12, 2021

Viewing posts 1–8 of 8

Hi Team,

I had raised a request to get my hyperlinks on single post content to be shown as red color so it's easier to identify. However, the same thing does not take effect when I am composing the post. WHen I hyperlink a text. It doesn't turn red and then I am not sure whether the link was attached correctly or not. Could you please modify the code or provide new code so the same thing can be achieved while writing the content in Gutenberg?

------------------------------------------

This is everything that was added since I jumped ship to GP read theme.

@media(min-width: 1024px){
/* increase max width */
.single.right-sidebar #page {
max-width: 1600px;
}
/* fix width of content */
.single.right-sidebar #primary {
max-width: 800px;
margin-left: auto;
}
/* fix width of sidebar */
.single.right-sidebar #right-sidebar {
max-width: 400px;
}
.single.right-sidebar #main {
margin-left: 20px;
}
} /* link color red */

.single-post .entry-content p a, .single-post .entry-content li a {
color: red;
}
.single-post .entry-content p a:hover, .single-post .entry-content li a:hover {
color: green;
} /* table hyperlink red */

.single-post .entry-content a:not(.wp-block-button__link) {
color: red;
}

.single-post .entry-content a:hover {
color: green;
}

Leo, That is just too much information for me to handle :P.

Step 1. You will need to create an editor-style.css file with your necessary CSS, and add it to your child theme.
(Where do I create this file ) path or steps to do it ? and what necessary CSS I need to add there?

Step 2.Then in your child theme functions.php file, you need to add this:
add_action( 'after_setup_theme', function() {
add_editor_style( 'editor-style.css' );
} );

I think I can find functions.php but if you can confirm the path then I am sure I am making changes at the right place.

best Regards
Amit

Just wondering, have you set the red color you want in Customizer > Colors > Body > Link Color?

If it's set there then it should apply to the editor.

If I change something in the customizer then it affects the home page, as the home page has a red background button with white text, so if I change it to red then the text is not visible on the homepage.

Is the home page the only problem?

Then maybe the best solution is to target your CSS for the home page instead of changing everything else with CSS?

I will create a staging area tomorrow and make changes in the customizer and will see what breaks and what works. and Will then get back to you.

This is just too overwhelming to remember where what I have to enter.

Best Regards
Amit

Sounds good :)

This archived topic is closed to new replies.