The simple answer is NO, You can not! CSS stand for Cascade Style Sheet
which mean to style elements in cascade order. CSS can not change the DOM.
There are two ways to achieve it.
- Overriding
header.php
- Using JavaScript or jQuery (Not recommended)
Method 1: Copy the header.php
to your child theme and modify href
link with what you want!
Example:
<a class="home-link" href="#main" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
<h1 class="site-title"><?php bloginfo( 'name' ); ?></h1>
<h2 class="site-description"><?php bloginfo( 'description' ); ?></h2>
</a>
Method 2: Personally I will not recommend it. It is better to have less js as much as possible. If you want to go with this solution you can ask this to stackoverflow.com
Related Posts:
- Versioning @import of parent theme’s style.css
- Attributing a version number to a child theme’s main stylesheet
- how do I queue my Child stylesheet/s *after* every Parent stylesheet/statement?
- Why is the Child Theme Stylesheet Not Loading?
- Give priority to child theme stylesheet
- How can I make new .css file in child theme override styles in child theme’s style.css
- Style.css in child theme is loaded before Bootstrap
- Overwrite CSS with without deleting it
- Child Theme vs. Jetpack Editor
- How do add a the style-mobile css from the main theme to the child theme?
- Child theme style.css isn’t overwriting parent style.css
- How to use custom stylesheet only for a template in child theme
- Order of stylesheets in child theme
- Child theme problem
- What is the correct workflow for modifying child themes?
- How can I get this child theme stylesheet to properly load? Or if it is correct, why doesn’t my child theme appearance match the parent?
- Child theme not importing parent styles
- Stylesheet overriding in Child theme
- Two stylesheets acting on one element
- WordPress Child Theme – twentyeleven
- Modify Twentyeleven child theme CSS – How to change body font size?
- Enqueuing multiple stylesheets with a child theme
- How to override styles from child theme if all the styles are in a folder?
- How to activate the child theme in WordPress?
- How to create my own style.css file in an wordpress child-theme
- How do themes provide support for child themes?
- Cannot get Child Theme to load latest version of style.css
- Child theme does not overwrite parent themes style.css
- How do I remove specific styles from the parent theme css using the child theme css?
- How to use parent theme’s enqueue methods
- How do I override a parent theme’s language files with a child theme?
- Do all files in child theme override the parent?
- add generated stylesheet from parent theme after child-themes style.css
- How to solve “Warning: Use of undefined constant” when overriding a parent theme function in the child theme?
- Developing a childtheme, how to disable the parents templates?
- Under heavy cache conditions, updating the parent theme don’t reflect changes with child theme enabled
- When activating a child theme, what core settings have to be reset ie; Custom Menus etc?
- Hwo to turn off “get_parent_theme_file_path” in child-theme?
- Customized widget area – how to override or filter class xoxo?
- Enqueue more than two CSS styles in a child theme functions.php
- How are updates to the style.css file in child theme recognized?
- Adding or modifying in files of parent theme via child’s function.php
- Child themes & updates?
- How do I copy my Parent Templates to my Child Templates?
- Where to put custom PHP files in a child theme?
- Why is “get_template_directory_uri” pointing to child theme?
- ERROR MESSAGE: Missing index.php—Child Theme
- How to make child theme ignore a parent themes template
- Conditionally load child themes
- Is my child theme working properly
- bbpress change the word forum, topic, reply in the forum to another word I choose
- How to load parent theme style.css?
- Overriding a parent theme folder in the child theme
- How do I override a sidebar that is registered in a parent theme when using a child theme?
- PHP loop that selects posts with a particular in-post option
- Child Theme Translations with PoEdit
- Someone created a child theme, but I need to modify it to reorder content. How do I access the child theme?
- Parent theme CSS overriding child CSS rules
- Child theme works in local environment but is not working on remote
- Tesseract child theme loads slow [closed]
- Localize strings for translation
- Add head and body function for google tag manager in child theme
- Child theme does not load all style
- Can I add customizer sections in the Twenty Seventeen theme?
- Child Theme with multiple css files
- Child theme not overriding ‘includes’ folder on server – on localhost it does
- How Child Themes Directory works for plugins?
- Why is this jquery / java script code not working in mobile / in devices?
- Not all CSS elements transferring via parent to child?
- The requested theme does not exist. Stylesheet is missing – error after changing style.css name to my-styles.css in wp child theme?
- Remove CSS Attribute by Overriding CSS in Child Theme
- Show full post in category archive pages in twenty-nineteen theme
- css media query question [closed]
- Parent theme styles overriding child theme CSS [closed]
- How to override template files in parent theme?
- LESS not working in WordPress [closed]
- style.css of child theme is not overwriting parents style.css for .box
- Change custom featured image size in twentythirteen child theme
- Can’t seem to get javascript code working from child theme
- Css will not display in webpage, after adding it in style.css in child theme
- Can I place “parent theme” inside a child theme folder?
- template_include doesn’t work with child theme
- Dequeing Parent Fontawesome Deques Parent Styles
- Remove Stylesheet by URL that has not been enqueued
- WordPress childtheme not loading any CSS/SCSS
- How to enqueue multiple style sheets into my child theme in wordpress (oceanwp)
- Swap SVG icons in child themes
- How to fix error message to edit sidebar widget text on a livesite childtheme?
- Child Theme Can’t Find Parent In a Folder
- Problems with child theme
- child theme showing all this extra information for following lines
- CSS in child theme to replace !important in parent theme
- Installation directory for WordPress and child theme
- How to include only modifications in child theme?
- Child Theme > Template
- Browser stacks different versions of style.css
- How to add modified php in child theme?
- WordPress | enqueue_scripts in a child’s theme returns error
- Child theme customizer preview doesn’t work/load
- theme.json should be in the child theme folder when using xxxx.json style located in the styles folder?