Often times, when I try to add my own custom PHP source codes to the template files (sidebar.php, index.php, header.php, etc…), it generates errors. However, it works properly on it’s own outside of WordPress. Is there a way for me to use my custom PHP stuff in WordPress’ template files?
Share
If you’re talking about the
sidebar.php,index.phpandheader.phpinwp-content/themes/themename/, well, of course you can edit these files. They are meant to be edited. Only make sure that you don’t overwrite existing PHP functions…You can read about that on WordPress’ Docs