• Hi,

    I’m trying to override a function in Tracks (ct_tracks_social_site_list() ) because I want to add another social icon

    I could easily copy the function and add an _child() to it and modify the social-icons.php but then I cannot edit this social icon in the backend

    If your parent theme would have a function_exists wrapper, this would be an really easy task, could you implement this?

    Kind regards,
    Kai R.

Viewing 1 replies (of 1 total)
  • Theme Author Ben Sibley

    (@bensibley)

    Hi Kai,

    Thanks for using Tracks!

    That is a good point, ct_tracks_social_site_list() would benefit from a function_exists() check, and I will add this in the next update.

    For now, what you can do instead is copy the social-icons.php from Tracks into a “content” folder in your Tracks Child theme. Tracks uses get_template_part() to get the social-icons.php file, so once added to your child theme it will automatically override the social-icons.php file in Tracks.

    Then you could completely cut out the backend and just add a list of icons in plain HTML to that file.

Viewing 1 replies (of 1 total)
  • The topic ‘Adding function override for child themes’ is closed to new replies.