Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #27706

    Hello. I have created a child theme for enfold and want to add styles for the google map widget. I have successfully done this in /enfold/framework/php/class-framework-widgets.php however I don’t want this code to be over written in the next update. What files should I copy over to my child theme so this doesn’t happen?

    #135067

    Hi,

    Create this file in the child theme

    /framework/php/class-framework-widgets.php

    So make 2 empty folders inside the child theme, one inside the other to mimic the structure of enfold and in the second folder called php which is located inside the folder called framework, paste the file class-framework-widgets.php from the parent theme.

    Thanks,

    Nick

    #135068

    Thank you for your quick response. After following your instructions the new code did not overwrite the parent file. Is there anything else I need to do?

    *edit – I have also tried this one /wp-content/themes/enfold-child/includes/admin/register-backend-styles.php and that code didn’t override either. Not sure what I am doing wrong here

    #135069

    Hi BrandonBarringer,

    This doesn’t actually work with child themes because the file isn’t getting registered with the child theme functions.php. There are a couple of options but the one I recommend over adding it to a child theme is to just modify the parent theme and make a change log of your own with notes on the files you’ve changed.

    The reason being that if you are modifying the framework folder anyway, pulling out a specific function and overwriting it with the child theme could cause major issues when the framework is updated.

    Otherwise you can try filtering the functions with your own functions if you are familiar with it.

    Regards,

    Devin

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘avia google map widget custom styles’ is closed to new replies.