• Resolved TWD

    (@twd)


    If I use your plugin when the theme has an existing functions.php

    Does it:
    a) Conflict and not work at all?
    b) Overwrite whatever is in the functions.php file
    c) Append any new functions i.e. add to the hard coded functions.php file

    Thanks.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    b) Overwrite whatever is in the functions.php file

    That would break almost all themes. Can you instead create a child theme and add your additions there?

    https://codex.wordpress.org/Child_Themes

    Thread Starter TWD

    (@twd)

    So in other words, if we use this plugin we should cannot have a pre-existing functions.php file in the theme?

    I just want to CONFIRM that point. Nothing else.

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    So in other words, if we use this plugin we should cannot have a pre-existing functions.php file in the theme?

    No. Why would you think that?

    Thread Starter TWD

    (@twd)

    Because your original response was unclear.

    So the correct answer is, the plugin will:
    c) Append any new functions i.e. add to the hard coded functions.php file

    Can you confirm?

    Thread Starter TWD

    (@twd)

    OK. Never mind.
    I’m going to use the Code Snippets plugin instead.
    https://wordpress.org/support/topic/what-if-theme-already-has-a-functions-php-file-2/

    Plugin Author arthur-gareginyan

    (@arthur-gareginyan)

    Hello @twd,

    Sorry for the delay in response.

    The plugin works completely independently of the theme, so you can use it with any theme, and regardless of whether the theme does or does not have a functions.php file. The code you place on the plugin page will be entirely unaffected if you edit the contents of the theme’s functions.php file, or even completely change the theme.

    Kind regards,
    Arthur

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘What if theme already has a functions.php file?’ is closed to new replies.