RFE: Database error in theme? (4 posts)

  1. sidesh0w
    Posted 11 years ago #

    I see that 1.5 has a prettified database connection message in includes/wp-db.php; is there any way to migrate that into the themes schema? It'd be great to style that without touching the core WP code.

    Just a thought--thanks,

    - Ethan

  2. skippy
    Posted 11 years ago #

    The currently activated theme is defined in the database, so what you suggests creates a chicken-and-egg problem:
    in order to style the error, a successful database connection must be made
    but the error is occuring specifically because a database connection could not be made!

  3. sidesh0w
    Posted 11 years ago #

    Ah, right. Pardon me while I smack myself in the forehead.

    Still, it'd be pretty cool to have a customizable error template outside of the core.

  4. Kafkaesqui

    Posted 11 years ago #

    Instead of the message you could perform an include to a "themed" file, as described here:


    However, any WP-related elements would (naturally) have to be hardcoded into your included file. So you wouldn't really be able to hook into the theming functionality, but you could code up a page that duplicated a theme's layout.

Topic Closed

This topic has been closed to new replies.

About this Topic