Support » Fixing WordPress » 1.3 wp-header/wp-footer/alternate templates

  • Can someone please explain the point/use of the wp-header.php and wp-footer.php files in the new 1.3 template?
    For insteance, how would one go about writing a special result page that is displayed when a user performs a search, ala wp-content/search.php?
    Is this functionality more useful than it is confusing?

Viewing 3 replies - 1 through 3 (of 3 total)
  • But if the point of my having a separate search page is to provide the same old search results with a different menu on the sidebar than what would normally appear, this does nothing for me, right?
    Actually, it would seem to make things more difficult, since I wouldn’t have to create a search.php file, but I’d have to put all my own conditionals to detect a search page (ok, just one, but still) into footer.php.

    Er. Wait a minute. The header and footer aren’t included when an alternate page is used. So to do what I’ve described above, I would have to create a search.php page, and it would have to have footer-like code in it to display a sidebar. Correct?
    I guess if I want my sidebars on all my pages to look the same, this works with an include, which is pretty simple.
    Clearly, this “advanced” feature needs documentation.

    The point is the separate search page can do anything you want it to do, it is not limited to the built in search function of WP.
    Your are right it would be more difficult if you are just trying to recreate what WP already does.
    During the past 10 minutes I have been playing around with search.php on my site and I have it offer a google search if nothing is found, show only the excerpt, etc. No tweaking of the base files in WP – If I screw up search.php, I just delete it and I am back to square one.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘1.3 wp-header/wp-footer/alternate templates’ is closed to new replies.