Friday, September 28, 2012

How To: Trick WordPress into pulling in your header

I can't take credit for this one, my boss figured this out.

Let's say you want to use a header file from somewhere on your site as the same header for your WordPress blog, but it's a .shtml header or something and WordPress is whining about php again.

With Apache, you can just put the following into/as the "header.php" file in your WordPress theme:
<?php
apache_setenv("Title", "TITLE");
apache_setenv("Description", "DESCRIPTION");
virtual("LOCATION");
?>
Where TITLE is your desired blog title (text), DESCRIPTION is your desired description (also as just text), and LOCATION is the location of the silly thing (file path).

1 comment:

  1. Top 10 Best Casinos Near Denver, CO - Mapyro
    › Casinos › Top-10-Best-Casinos › Casinos 전라북도 출장마사지 › Top-10-Best-Casinos Find 부천 출장안마 the top 10 casinos near Denver, CO in 2021. Mapyro 포천 출장샵 has compiled a list 나주 출장샵 of the top 10 casinos in Denver, along 여주 출장샵 with other recommended gambling sites

    ReplyDelete