I have an error occurring on my Wp site. Not just one of them, but all of them. I am thinking that this is a WP bug. All of the themes being run are custom designed and coded. Coded by me. I have tried to debug the error myself but have had no luck. Perhaps this is an error I am causing.
when calling get_header(), get_sidebar(), or get_footer(), these functions are running several times. For example, say you have get_header() in index.php. When you visit index.php, the get_header() function is called several times, yet only displays once. I know this because I added a php mail(); call in the header.php file, sending an email to myself. I receive the email several times. Depending on the theme, anywhere from 2 times to 12 times! This is not good. I added a mail() call to the default WP theme, and only received an email once. Either I am coding something wrong, or some WP function I am using does this.
I have scoured the net in search of a solution, but have found nothing. I would be willing to provide one of these themes to anyone who wants to try and figure out the issue.