Site logo

Archived topic

Child theme best practice - should I still use simple css and code snippets?

3 replies · Started by Cleo on May 19, 2020

Viewing posts 1–4 of 4

I fear this has been asked before but there are so many results for child-theme related questions that I'm loath to sift through them all.

I need to create an alternative archive page to display custom post types and was planning to copy and modify the archive.php file (along with other required files). I believe a child theme would be the best solution for this since you can't really add entire PHP files with the Code Snippets plugin.

Once I create a child theme and add these PHP pages, should I stick with that model - customizing my CSS and PHP in the child theme's style.css and functions.php files? Or, is it a better idea to do as much customization within the admin interface using simple.css (or custom CSS) and Code Snippets.

It seems like there are a lot of options for customization, so I'm looking for best practices or good reasons to pick an approach and stick with it.

Hi there,

as you will be requiring a Child Theme for your modified archive.php i would keep all my styles and functions in the Child Theme.

Its better they are in one place as this will reduce the chance of annoying conflicts :)

I ended up creating custom post types with plugin: CPT UI. Then using the Content Aware plugin to create a sidebar that would be used only on the custom post type archive page. That replaced the need for me to create a "custom post type" archive.php file. I may end up going back and doing that to reduce my reliance on plugins.

Glad to hear you found a working solution

This archived topic is closed to new replies.