• bakura

    (@bakura)


    I have added the following go to the top of my header template file:

    <?
    $gen_time = microtime();
    $gen_time = explode(' ', $gen_time);
    $gen_time = $gen_time[1] + $gen_time[0];
    $gen_start = $gen_time;
    ?>

    I have added the following code to the bottom of the footer template:

    <?
    $gen_time = microtime();
    $gen_time = explode(' ', $gen_time);
    $gen_time = $gen_time[1] + $gen_time[0];
    $gen_finish = $gen_time;
    $total_gen_time = round(($gen_finish - $gen_start), 4);
    echo 'Page generated in '.$total_gen_time.' seconds.'."<br />";
    ?>

    For the life of me, I cannot figure out why I get outputs like this when the page loads near instant:

    Page generated in 1207596110.82 seconds.

    I have used this code outside WP without problems. Why is it an issue with WP templates? Any thoughts?

Viewing 3 replies - 1 through 3 (of 3 total)
  • It works fine for me. Perhaps it’s an issue particular to your theme or PHP install.

    Thread Starter bakura

    (@bakura)

    It’s not PHP because I can do this in outside of WP. I thought it might be the theme also, so, I change my variable names just in case there was some sort of conflict. Unfortunately, that didn’t help. I then tried the default theme with WP and that still didn’t work.

    I need to figure something else to try and I am a little how of ideas.

    Thank you for trying it out yourself. I wish I knew the difference. Maybe it’s a plugin doing something…. who knows.

    Thread Starter bakura

    (@bakura)

    It’s not PHP because I can do this in outside of WP. I thought it might be the theme also, so, I change my variable names just in case there was some sort of conflict. Unfortunately, that didn’t help. I then tried the default theme with WP and that still didn’t work.

    I need to figure something else to try and I am a little how of ideas.

    Thank you for trying it out yourself. I wish I knew the difference. Maybe it’s a plugin doing something…. who knows.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Problem: Printing Page Loading’ is closed to new replies.