0

I am making my first steps coding. I made some courses on Internet and now I am building a wordpress theme to continue learning from the practice.

I have a child-theme from the twenty sixteen theme. I found that in the customize section in the wordpress admin I can change the background of the site and also something that is the background of that background. It's something a bit strange for me.

enter image description here

I am looking everywhere in the css code of the theme to remove that but I can't find it. Is it possible to only have that white section? and not that yellow block?

UPDATE:

I find that it's called body .custom-background but what I don't understand is what is that? what is the difference between that an my page that I can set to white? Is not possible to make my page in the window inner height? That yellow thing is like something that makes the limit of my page.

enter image description here

3
  • you can change the background color by customization background color itself r8? Commented Apr 27, 2016 at 11:27
  • Yes I can change the background color but the block is still there. What I'm looking for is to remove that block so my site will ends in the bottom of the page. Commented Apr 27, 2016 at 11:55
  • It may be footer block space check it by adding any copyrights or footer content. Then you can remove the footer background color or block space. Commented Apr 27, 2016 at 12:01

2 Answers 2

1

I am assuming that you want to remove the customize setting for background color from the customize option , If yes then you need to open customizer.php in the inc folder in the theme

comment out the following code ( approx line 33 )

add_theme_support( 'custom-background', apply_filters( 'twentysixteen_custom_background_args', array( 'default-color' => $default_background_color, ) ) );

Hope this helps

Take care and Happy coding

Sign up to request clarification or add additional context in comments.

3 Comments

Thank you Dhaval but what I'm looking for is to remove that block where I can change the background. I want to remove it from my html so my site would ends in the bottom of the window and not in the top of that block. I try to find it in the code where is it but I can't achieve it.
In fact is a big thing that contains all the elements of my site but It's impossible to find using the browser's inspect
it is the body.custom-background selector
1

Be aware that it might be difficult to remove the yellow section, depending on your level, but it is definitely possible.

It looks like the yellow you're seeing is on the site container, and the white background is inside it, like this:

<div class="yellow container">
    <!-- some more divs -->
    <div class="white content">
        <!-- post content -->
    </div>
</div>

Use your browser's inspect element to see the name and position in the html of the yellow section. The solution is probably not to remove the yellow section (since the white section may be inside it), but to make the white section fill the yellow section entirely, blocking it out.

In the sidebar of the inspector, you can edit the css of the page. Try using display: none; to remove the yellow element.

If you are successful, add your css to the custom css section of the theme. Be sure to test it on all screen sizes. Good luck.

2 Comments

Thank you very much! but when I use the browsers inspect to see it (making a secondary click on the element) it only shows me all the elements of my page, but it's not possible to find that yellow section. Its something a bit strange because it's an invisible element in the code.
Did you try right-clicking the yellow element and selecting "inspect element"? That usually jumps directly to the element.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.