Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • in reply to: Programmatically change theme options in child theme #103828
    Mark
    Participant

    Perhaps I need to simplify this!

    The reason I would want to override the catchbase_get_default_theme_options function is because I want to have my own set of default theme options for my child theme.

    I don’t see anyway to change the default values with a function as they are hard coded into the existing function catchbase_get_default_theme_options. I think I have now realised that what I want to do is not possible because:

    a) The files inside the inc folder of the child theme do not override the parent theme
    b) The existing function catchbase_get_default_theme_options is not child theme ready

    It’s not really a problem just an inconvenience!

    in reply to: Programmatically change theme options in child theme #103782
    Mark
    Participant

    Thanks for that Mahesh. I sort of understand what you mean – I’ve seen similar solutions for other requirements in child themes but on this occasion, the functions I’m looking at are catchbase_get_default_theme_options and catchbase_get_theme_options (which calls the first one). Neither of these are added as actions anywhere and catchbase_get_theme_options is just called from within many other functions that need to access the theme’s options values using something like $options=catchbase_get_theme_options()

    So please correct me if I am wrong (I hope I am!) but I don’t see how I can use remove_action for catchbase_get_default_theme_options or catchbase_get_theme_options in order to replace them using add_action

    in reply to: Programmatically change theme options in child theme #103775
    Mark
    Participant

    Quick Update, I read somewhere else that files in the inc folder don’t get used in child themes and that you should simply take the functions from files in the inc folder and put them into your functions.php file.

    So I did that with the catchbase_get_default_theme_options() function and that allows me to set all the defaults which **would** be good. However that function in the main (parent) theme does not seem to be child theme friendly – it doesn’t have the if !function_exists code around it. So I get ‘Cannot redeclare….’ errors.

Viewing 3 posts - 1 through 3 (of 3 total)