N
N
Nik_10112020-06-28 08:33:30
WordPress
Nik_1011, 2020-06-28 08:33:30

What can be removed and edited in the Underscores template for WordPress?

Hello!

I just started working with the Underscores template for landing layout on WordPress and I had a few questions:

1) Is it possible to clear the functions.php file (leave it empty and then write my own functions to connect the sidebar, scripts, styles, etc.) or can I rename the functions, for example, connections scripts and styles and substitute the paths to your scripts and styles there?

2) Is it possible to do this (clear and write your own) with other starter theme files (page.php, index.php and others)?

3) Can I replace the standard theme files (css, js) with my own or do I need to create a separate folder with my files?

4) Should I delete unused files (custom-header.php, style-rtl.css etc)?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anton Litvinenko, 2020-06-28
@Nik_1011

If you have generated the underscores template for landing the layout, then you can do whatever you want with it. Underscores includes best practices and a lot of useful stuff, and before removing functions from function.php see if you're likely to need it or use it as a sample. The same menus, sidebars and more. Much can be removed, since you have already made it up, for example, navigation and its files, rtl, you may not need infinity scroll, additional settings in the customizer, etc.
Page layout is probably not suitable, but pay attention to cycles, special features, especially in the header.
If this theme is yours and will not be updated, then you do not make a child theme, it will already be done by someone who will probably customize after you.
As an alternative, there are also empty templates in the WordPress repository that can be used as a starting point.

D
Dima Polos, 2020-06-28
@dimovich85

Nothing in the theme folder can be fixed.
You need to inherit from the theme. In the successor, you can create templates that will be taken from your theme in priority. functions.php will work for both yours and the parent.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question