0
Welcome Guest! Login
0 items Join Now

Child theme for custom functions.php?

    • Tim2006's Avatar
    • Tim2006
    • Hero Rocketeer
    • Posts: 282
    • Thanks: 0

    Child theme for custom functions.php?

    Posted 3 years 4 months ago
    • WP 5.6
      PHP 7.4

      Hi,

      I have edited my functions.php to add a bit of custom code that does xyz. And that is fine.

      But to save me redoing this if the theme is updated I tried creating a child theme according to the instructions here - docs.gantry.org/gantry5/theme-developmen...hild-theme-wordpress

      But that is causing a world of pain with errors and exceptions (currently showing 'Twig \ Error \ RuntimeError
      An exception has been thrown during the rendering of a template ("No menu selected").').

      My question is - are these instructions up to date and work for Fluent?

      If the instructions are up to date I am happy to carry on trying to work out what the problem is myself.

      Or is there another way of adding custom code to the functions.php file that I've missed?

      Many thanks

      Tim
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13481
    • Web Designer/Developer

    Re: Child theme for custom functions.php?

    Posted 3 years 4 months ago
    • I wouldn't use child-themes at all - it's more trouble than it's worth, you will be just swapping one issue for another.

      Nevertheless, the instructions are up to date and do work with Fluent.

      No, you have to change functions.php - there's no override capability for that.

      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.

Time to create page: 0.036 seconds