Skip to:
Content
Pages
Categories
Search
Top
Bottom

How to use snippets


  • Aron Prins
    Keymaster

    @aronprins

    Hey everyone,

    I wanted to quickly explain how you can use snippets in your WordPress sites.

    Ideally, you’d create a custom plugin file – boilerplate coming soon – where you add snippets found at TotallyWP in one file rather than many others, or modify your theme’s functions.php file. If you choose the latter, and your theme gets an update… your snippets are gone, and all functionality is as well!

    The easiest way is to modify your theme’s functions.php file, though this is not considered best practice.

    A better alternative is to create a child theme for your existing theme, adding a functions.php file there that contains your snippets.

    Let me know if you need any help!

  • You must be logged in to reply to this topic.
Skip to toolbar