Osclass Themes and Osclass Plugins

How to Create a Child Theme in Osclass Without Upgrade Pain

Build and use a child theme so you can customize safely while keeping core theme updates simple and low risk.
Case Studies & Real Implementations
23. March 2026
5 min read
20425 views
How to Create a Child Theme in Osclass Without Upgrade Pain

Quick overview

Build and use a child theme so you can customize safely while keeping core theme updates simple and low risk.

What this article covers

  • What is child theme?
  • Create blank/empty child theme
  • Working with child theme
  • a) Create custom CSS stylesheet for child theme

Practical notes

  • Validate changes in staging before production updates.
  • Track user impact with analytics, logs, and search performance signals.

What is child theme?

Child theme in osclass (as in wordpress, prestashop or other classifieds scripts) is tool that allow to modify theme without affecting original theme. Child theme allows to update original theme, without affecting your modifications. Objective of child theme is not to replace everything, but allow slightly modifications in particular files, it's good to note that child theme will contains only files those should be replaced or modified.

Make sure to check our CSS customization guide with simple examples: https://docs.osclasspoint.com/customizations-of-theme-basic


Create blank/empty child theme

We will need several files to create our blank child theme, for next of this article we will be using Gamma Osclass Theme and will try to create Gamma Child Osclass Theme.

  1. Create folder for our child theme in oc-content/themes in format yourtheme_child, so in our case it is gamma_child
  2. Into gamma_child copy index.php and screenshot.png
  3. Open index.php and add Parent Theme value and update name (so you see difference in oc-admin), referencing what is parent theme for our child, in our case it's gamma. Index.php will look like this:
    <?php
    /*
    Theme Name: Gamma CHILD Osclass Theme
    Theme URI: https://osclasspoint.com/
    Description: Responsive fast and clean premium osclass theme
    Version: 1.0.0
    Author: MB Themes
    Author URI: https://osclasspoint.com
    Widgets: header,footer
    Theme update URI: gamma-osclass-theme
    Product Key: GFE1crrhnvi0AtRiagJp
    Parent Theme: gamma
    */
    ?>

Child theme is created and ready to use activate from oc-admin! Keep in mind you cannot remove parent theme when using child theme. This step is last in most of tutorials, but what you should do next? Noone knows that even osclass docs does not provide more details.... so let's continue!

Working with child theme

There are few things to remember when working with your child theme.

  • In PHP, each function must have unique name. If you want to update some function from parent theme, you can copy & paste it, but name of it must be changed and usage of function updated in child theme
  • There are 2 types of files replacement:
    • Osclass initiated - for files directly loaded by by osclass as: main.php, search.php, item.php, user-register.php, ...
    • Theme initiated - files loaded from theme files as: header.php, head.php, loop-single.php, search_gallery.php, ...

Let's do something on example. Our objective is: 

  1. Create custom CSS stylesheet in child theme and add it into theme
  2. Replace theme footer on homepage with custom text: Hello footer!!!
  3. Update home page and add there text: Hello world!!!

a) Create custom CSS stylesheet for child theme

Stylesheet is referenced from head.php, this file from header.php and header is called from each file, so creating custom head.php does not make sense. Rather then we will create function to add our stylesheet via hook from functions.php

  • create blank functions.php
  • Add there following functions:
    function gam_child_custom_css() {
    osc_enqueue_style('style-child', osc_current_web_theme_url('css/style-child.css'));
    }
    osc_add_hook('header', 'gam_child_custom_css')
  • Create folder css in child theme folder and enter to this folder
  • In oc-content/themes/gamma_child/css/ create file style-child.css 
  • You now can put own styling & css code into style-child.css, site will now contain your stylesheet:
    <link href="https://dev3.abprofitrade.eu/oc-content/themes/gamma/css/style-child.css" rel="stylesheet" type="text/css" />

b) Replace theme footer on home page

Now we will update footer.php to have custom footer on home page. Note if you would like to have custom footer in all the pages, you would repeat bellow procedure for every file in theme.

  • create copy of main.php (copy file from gamma folder into gamma_child
  • update main.php in child folder, find following line:
    <?php osc_current_web_theme_path('footer.php'); ?>

    and replace it with:
    <?php include osc_base_path() . 'oc-content/themes/gamma_child/footer.php'; ?>
  • create blank footer.php in child theme folder (you could also copy one from parent theme) and put there:
    <footer>Hello world footer!</footer>

Your footer is now updated.

c) Update home page - add custom text

We will now update home page and put there own text or block.

  • from parent theme copy main.php (if you've tried point b), this step is not needed
  • open main.php and put there own text or code and save

Your home page is now updated.

Note from author to child themes

We have created custom child theme in classifieds, can now freely update our parent theme etc... however there some questions unanswered:

  • How to handle translations in child theme?
  • How to keep on track no modifications made in parent theme, i.e. if we have custom home page in child and home page in parent has been updated?

Basically we recommend to use child themes just for custom stylesheets, javascripts and functions to be added via hook, hence copying all the files from parent into child and updating it all the time there is new update in parent is making usage of child theme useless. Before using or bying your classifieds theme make sure it match your expectation and avoid redeveloping it from scratch, as it may be contra productive.

After setup, use translating themes and plugins. Preview free layouts on our free themes demo site.

Frequently asked questions

Question: How do I create a Gamma child theme in Osclass without copying the parent?

Answer: Copy only the files you override. Create oc-content/themes/gamma_child, copy index.php and screenshot.png from Gamma, and set Parent Theme: gamma in the header. Activate the child in Appearance. Keep the Gamma parent installed so files you did not copy still load. A full copy stops parent updates from applying.

Question: Why can I not delete OsclassPoint Gamma theme while gamma_child is active?

Answer: Keep Gamma installed while gamma_child is active. Osclass loads missing files from the parent, so deleting Gamma leaves templates with no fallback. The child should hold only overrides. Copy one file at a time. Parent updates then still apply to files you did not place in the child folder.

Question: How do I add style-child.css to an OsclassPoint Gamma child theme?

Answer: Create functions.php in gamma_child and hook osc_enqueue_style on header so Osclass loads css/style-child.css from the child. Put the file in oc-content/themes/gamma_child/css/. Do not copy parent head.php only to add a stylesheet. Gamma updates then keep applying to files you did not override.

Question: What happens if I replace footer.php in an Osclass child theme?

Answer: Copy footer.php into the child and make templates load it with osc_current_web_theme_path so Osclass checks the child folder first. On older Osclass, a raw include of the parent footer can ignore the child file. Osclass 8.0 hard-checks the child with that helper. Copy only the files you override.

Question: Can I keep the same PHP function name in an OsclassPoint Gamma child theme?

Answer: Rename a Gamma function if you copy it into the child, then update every call in that file. PHP function names must stay unique. Leaving the original name causes a cannot redeclare fatal error because the Gamma parent already declared it. Copy only the override file that needs that function.

Question: Why does copying every OsclassPoint Gamma file into the child make it useless?

Answer: Put only overridden files in gamma_child so Gamma updates still apply. A full copy means every update must be merged by hand. Start blank and copy one file at a time. Parent templates you did not copy keep loading from Gamma. That is the point of a child theme.

About the Author

My passion is building classifieds marketplaces, automating workflows, and turning messy data into useful products. From PHP, HTML, CSS, and JavaScript to Python, crawlers, imports, and SEO, I enjoy solving technical challenges and sharing lessons learned from real-world projects. Most ideas start with a problem, a cup of coffee, and a curiosity to see how far automation can go.
Osclass, PHP, JavaScript, CSS, Python
52 posts Publishing since 04/2018

Shopping cart
Support tickets Downloads Reviews Orders & Invoices Payments
Dashboard My profile Change password Download user data
Logout