Editing functions.php and single.php

Posted in: Newspaper
Post count: 127

I’m making some edits to my website and I need to put some things in those two PHP files. However in doing so I’m sure it’s going to be overwritten every time I do an update. Is there another way to inject code into this page that is persistent? I’m trying not to break the theme by doing this.

  • This topic was modified 1 year by jtoney.
Post count: 21065

Hello!

It depends on the code you want to add and what you need to do. You can add some JS code in the theme panel -> analytics/js codes. In the tagdiv Composer, you can find some shortcodes RAW HTML and RAW CSS: https://forum.tagdiv.com/create-custom-code-using-the-browsers-inspector/. You can add an extra class on each shortcode to easily refer the CSS code to them. If you use default templates, you can have a child theme: https://forum.tagdiv.com/the-child-theme-support-tutorial/

Thank you!

Viewing 2 posts - 1 through 2 (of 2 total)
The forum ‘Newspaper’ is closed to new topics and replies.