• Resolved babydu

    (@babydu)


    Hi, I installed this plugin in my website, and now I found that the added code could be inserted in the child theme.

    The both ways can achieve same function.

    So, what are the difference about the two ways?

    Does this plugin effect the performance of my website than child theme?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Mircea Sandu

    (@gripgrip)

    Hi @babydu,

    We structured the plugin such that you should see no difference in performance when compared to loading the same code from a child theme. All snippets are preloaded efficiently.

    WPCode can do a lot more than simply adding code in the same way you can in the functions.php file but one important benefit, if you already have a child theme, is that if your code in functions.php throws a fatal error you will have to go through FTP to update your file while WPCode has error protection built-in and even in the rare cases where WPCode can’t catch an error you can use the WPCode safe mode to immediately update your code directly from the admin.

    On top of all that, WPCode comes with built-in Auto-Insert Locations and Conditional Logic that reduce the size of the code that you have to maintain, and, you can also add non-php snippets for HTML, CSS, JS directly from the admin without having to write the logic for those in the functions.php file.

    Let me know if I can provide more info.

    Thread Starter babydu

    (@babydu)

    Ok get it.

    Thanks for your reply.

    And another, I still want to know what the difference between code snippets and the hooks?

    As you know, some themes like Astra, they supply a function that users can insert hooks in the dashboard.

    When should I use the hooks and the code snippets?

    Plugin Author Mircea Sandu

    (@gripgrip)

    Hi @babydu,

    I’m not familiar with the hooks from the Astra theme that you mentioned, in general, in WordPress, hooks refer to actions or filters that can be used to extend functionality in specific places: https://developer.www.ads-software.com/plugins/hooks/

    You can use code snippets to add code that leverages the hooks or you can use the functions.php file to achieve that, the difference in this case is in how that code is managed.

    Let me know if I misunderstood your question.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.