WordPress.org

Ready to get started?Download WordPress

Forums

wp_die () themed (9 posts)

  1. afacerov
    Member
    Posted 1 year ago #

    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!

  2. afacerov
    Member
    Posted 1 year ago #

    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') );

  3. esmi
    Forum Moderator
    Posted 1 year ago #

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

  4. afacerov
    Member
    Posted 1 year ago #

    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.

  5. esmi
    Forum Moderator
    Posted 1 year ago #

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

  6. afacerov
    Member
    Posted 1 year ago #

    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.

  7. esmi
    Forum Moderator
    Posted 1 year ago #

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

  8. afacerov
    Member
    Posted 1 year ago #

    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 http://www.tangoindulgence.com/beta/2012/06/27/hello-world/ to see exactly what I mean if you don't sign in.

  9. afacerov
    Member
    Posted 1 year ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic