WordPress.org

Ready to get started?Download WordPress

Forums

Automatic Phone Number Rotation works everywhere but header. (2 posts)

  1. nopopop
    Member
    Posted 8 months ago #

    I built a script that automatically rotates phone number depending on business hours, nights/weekends. The script works great, and I have inserted this code into many pages in the site.

    However, I am having a little trouble with the homepage header. The page stops building at the end of the header code, so the rest of the page does not get built.

    This is how it works for the pages that do work. I call the script RotatePhoneNumbers.php which only does the logic of checking the time of day and deciding which phone number to use. I created a function which is called PhoneNumberPrint(#number); which prints the number after the logic is done.

    All of this works great on other pages, each of these pages are built successfully. And the logic is working to change and print the numbers. It's just an anomaly that changing the header page prevents the rest of the page of being built.

  2. bcworkz
    Member
    Posted 8 months ago #

    Sounds like the header page is causing an error severe enough that execution stops. Define WP_DEBUG as true on your config.php file. You should then get some indication of the nature of the error and where it happened in code.

Reply

You must log in to post.

About this Topic