• Hello,

    I have set up a child theme (of twentyten) and I understand the basic idea of editing it, however I can’t make my child theme overwrite any of the old code. I can ADD instructions, but I cannot REMOVE or EDIT instructions.

    For example, a line in the parent theme:
    <div id=”site-description”> X text </div>

    I don’t want there to be a site description in the top right, so I tried to remove this command. In the child theme style.css, I tried commands like “display:none” and “hide” but it simply doesn’t overwrite any of the old code. It’s possible that I’m not using brackets or angle marks correctly since I’m new to HTML, but I’ve followed a couple tutorials online and none of the things I’ve learned work for me. I’ve read a little bit about filters and so on; maybe that’s important but the tutorial I read was really advanced.

    If someone could give me a good link explaining how to do this (or walk me through an example) I would be really grateful.

Viewing 2 replies - 1 through 2 (of 2 total)
  • #site-description { display: none; } should work.

    always make sure that your new css styles are at least as specific as the one in the parent theme; if in doubt, add an !important after each style:
    #site-description { display: none!important; }

    to make changes in the styles visible, you may also need to refresh the browser cache by pressing the ‘reload’ button on the browser, or by pressing ‘ctrl f5’.

    if you post a link to your site, someone might be able to check this.

    I can ADD instructions, but I cannot REMOVE or EDIT instructions.

    not all things work with changing the stylesheet of the child theme or with filters – sometimes you need to copy one of the template files into the child theme and make edit in there.

    Thread Starter briceryant

    (@briceryant)

    Thanks for the response, it was very helpful; turns I wasn’t using the hash tags correctly to reference my edits.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Child themes and removal of code’ is closed to new replies.