Forums

Password protected page error (2 posts)

  1. siljeu10
    Member
    Posted 8 months ago #

    Hi

    Can somebody help me? I've tried to change the text "password protected" to norwegian in the theme functions.php and I used this code:

    <?php
    add_filter( 'the_password_form', 'custom_password_form' );
    function custom_password_form() {
    global $post;
    $label = 'pwbox-'.( empty( $post->ID ) ? rand() : $post->ID );
    $o = '<form class="protected-post-form" action="' . get_option('siteurl') . '/wp-pass.php" method="post">
    ' . __( "This post is password protected. To view it please enter your password below:" ) . '
    <label for="' . $label . '">' . __( "Password:" ) . ' </label><input name="post_password" id="' . $label . '" type="password" size="20" /><input type="submit" name="Submit" value="' . esc_attr__( "Submit" ) . '" />
    </form>
    ';
    return $o;
    }
    ?>

    Now the website is blank and I can't log in to the site or change the CSS because all the sites (the website and dashboard) is blank. It seems like all is gone. The site is http://rhetorica.uia.no. Can somebody try to help me?

  2. Jeremy
    Member
    Posted 8 months ago #

    In order to solve your problem, you'll have to re-upload the original functions.php you had in your theme via FTP, thus overwriting the changes you've made.

    One your site is back, you might want to look at a cleaner solution to translate elements of you theme.

    Look at the codex for more info:
    http://codex.wordpress.org/Translating_WordPress
    http://urbangiraffe.com/articles/translating-wordpress-themes-and-plugins/

Reply

You must log in to post.

About this Topic