- This topic has 7 replies, 2 voices, and was last updated 2 years, 9 months ago by Leo.
-
AuthorPosts
-
June 12, 2021 at 4:59 am #1819552Amit
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;
}June 12, 2021 at 7:06 am #1819648LeoStaffCustomer SupportHi there,
You will need to do this if you want to add CSS styles to the editor:
https://generatepress.com/forums/topic/change-wp-text-editor-font-family-or-size/#post-1476969June 12, 2021 at 7:22 am #1819664AmitLeo, 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
AmitJune 12, 2021 at 7:26 am #1819665LeoStaffCustomer SupportJust 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.
June 12, 2021 at 7:28 am #1819667AmitIf 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.
June 12, 2021 at 7:32 am #1819668LeoStaffCustomer SupportIs 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?
June 12, 2021 at 7:52 am #1819851AmitI 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
AmitJune 12, 2021 at 9:11 am #1819906LeoStaffCustomer SupportSounds good 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.