• first post so sorry if I don’t follow some posting rules.

    My whole website uses the twenty eleven theme. When someone doesn’t use their email or something is wrong with a comment it displays a default WordPress error, called by the wp_die function.

    I have been able to customize the wp_die function to display exactly what I want however does anyone know how I can display the twenty eleven theme when the wp_die function is called and not just a box with a white background?

    Thanks!

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter afacerov

    (@afacerov)

    BTW.
    Right now the wp_die code looks like this:

    wp_die( __('Please use Facebook or Twitter to post comments'),('Please sign In | Tango Indulgence'),('back_link=true') );

    That message is not coming from twenty eleven, so it must be from a plugin.

    Thread Starter afacerov

    (@afacerov)

    Esmi, sorry I wasn’t clear. I did that, that’s my working progress. That is what I want it to have, that works. The thing I have not been able to figure out is how to load the twenty eleven theme when wp_die gets displayed.

    I don’t think you can style a wp_die() message. Why not just output the error message normally?

    Thread Starter afacerov

    (@afacerov)

    How would I do that ? ( sorry I’m new to this, and I wasn’t able to find anything on google to style error pages or switch what page to display when you have a comment error on WordPress )

    To be clear I just want it to show the theme. To keep consistency. But I do want that title and message to appear.

    It depends upon how & where you are outputting the message.

    Thread Starter afacerov

    (@afacerov)

    It is part of the comment form errors handled by WordPress. Found in wp-comments-post.php.

    What happens if that if you don’t sign into either Facebook or Twitter that error gets displayed.

    You can go to https://www.tangoindulgence.com/beta/2012/06/27/hello-world/ to see exactly what I mean if you don’t sign in.

    Thread Starter afacerov

    (@afacerov)

    In other words I want a styled error page like the 404 page that comes with the twenty eleven theme to keep constancy.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘wp_die () themed’ is closed to new replies.