Autor Zpráva
eliška
Profil *
Dobrý den,
Prosím o radu jak mám nastavit aby přihlašovací formulář byl vidět pouze když nejsem přihlášena a jakmile se přihlásím aby se nezobrazoval? Vložila jsem do stránky [theme-my-login], když nejsem přihlášena je to v pořádku jsem vyžádána k vyplnění ale když už jsem přihlášena tak nechci aby tam ten formulář byl. Děkuji za radu


Jedná se o wordpress

Moderátor Davex: Titulek „Theme my Login“ nevystihoval podstatu dotazu. Příště zkus prosím vymyslet lepší.
jefitto44
Profil
Nechápem... do WP sa predsa prihlasuješ cez stránku www.tvojaadresa.cz/wp-login Keď si prihlásená, tak ťa to automaticky presmeruje na admin dashboard... či ne?
eliška
Profil *
Jde mi o to že chci mít zaheslovanou jenom určitou stránku. Na tuto stránku budou mít přístup jenom přihlášení uživatelé. Když na ní kliknu a nejsem přihlášena tak mi vyskočí formulář pro přihlášení. To mi funguje. Ale když už jsem přihlášená a znovu na ní kliknu tak se mi znovu zobrazí formulář pro přihlášení a teď už bych ho chtěla mít schovaný zase doku se neodhlásím.
jefitto44
Profil
eliška:
Treba to nájsť a hodiť tam if-else. To je celá veda... :)
eliška
Profil *
Asi by to mělo být tady. Kam bych to měla přidat?
<?php
/*
Plugin Name: Theme My Login
Plugin URI: http://www.jfarthing.com/extend/wordpress-plugins/theme-my-login/
Description: Themes the WordPress login, registration and forgot password pages according to your theme.
Version: 6.4.5
Author: Jeff Farthing
Author URI: http://www.jfarthing.com
Text Domain: theme-my-login
Domain Path: /languages
*/

// Allow custom functions file
if ( file_exists( WP_PLUGIN_DIR . '/theme-my-login-custom.php' ) )
    include_once( WP_PLUGIN_DIR . '/theme-my-login-custom.php' );

if ( ! defined( 'THEME_MY_LOGIN_PATH' ) ) {
    define( 'THEME_MY_LOGIN_PATH', dirname( __FILE__ ) );
}

// Require a few needed files
require_once( THEME_MY_LOGIN_PATH . '/includes/class-theme-my-login-common.php' );
require_once( THEME_MY_LOGIN_PATH . '/includes/class-theme-my-login-abstract.php' );
require_once( THEME_MY_LOGIN_PATH . '/includes/class-theme-my-login.php' );
require_once( THEME_MY_LOGIN_PATH . '/includes/class-theme-my-login-template.php' );
require_once( THEME_MY_LOGIN_PATH . '/includes/class-theme-my-login-widget.php' );

// Instantiate Theme_My_Login singleton
Theme_My_Login::get_object();

if ( is_admin() ) {
    require_once( THEME_MY_LOGIN_PATH . '/admin/class-theme-my-login-admin.php' );

    // Instantiate Theme_My_Login_Admin singleton
    Theme_My_Login_Admin::get_object();
}

if ( is_multisite() ) {
    require_once( THEME_MY_LOGIN_PATH . '/includes/class-theme-my-login-ms-signup.php' );

    // Instantiate Theme_My_Login_MS_Signup singleton
    Theme_My_Login_MS_Signup::get_object();
}

if ( ! function_exists( 'theme_my_login' ) ) :
/**
 * Displays a TML instance
 *
 * @see Theme_My_Login::shortcode() for $args parameters
 * @since 6.0
 *
 * @param string|array $args Template tag arguments
 */
function theme_my_login( $args = '' ) {
    echo Theme_My_Login::get_object()->shortcode( wp_parse_args( $args ) );
}
endif;

?>



Možná spíš tady?
<div class="tml tml-login" id="theme-my-login<?php $template->the_instance(); ?>">
    <?php $template->the_action_template_message( 'login' ); ?>
    <?php $template->the_errors(); ?>
    <form name="loginform" id="loginform<?php $template->the_instance(); ?>" action="<?php $template->the_action_url( 'login', 'login_post' ); ?>" method="post">
        <p class="tml-user-login-wrap">
            <label for="user_login<?php $template->the_instance(); ?>"><?php
                if ( 'username' == $theme_my_login->get_option( 'login_type' ) ) {
                    _e( 'Username', 'theme-my-login' );
                } elseif ( 'email' == $theme_my_login->get_option( 'login_type' ) ) {
                    _e( 'E-mail', 'theme-my-login' );
                } else {
                    _e( 'Username or E-mail', 'theme-my-login' );
                }
            ?></label>
            <input type="text" name="log" id="user_login<?php $template->the_instance(); ?>" class="input" value="<?php $template->the_posted_value( 'log' ); ?>" size="20" />
        </p>

        <p class="tml-user-pass-wrap">
            <label for="user_pass<?php $template->the_instance(); ?>"><?php _e( 'Password', 'theme-my-login' ); ?></label>
            <input type="password" name="pwd" id="user_pass<?php $template->the_instance(); ?>" class="input" value="" size="20" autocomplete="off" />
        </p>

        <?php do_action( 'login_form' ); ?>

        <div class="tml-rememberme-submit-wrap">
            <p class="tml-rememberme-wrap">
                <input name="rememberme" type="checkbox" id="rememberme<?php $template->the_instance(); ?>" value="forever" />
                <label for="rememberme<?php $template->the_instance(); ?>"><?php esc_attr_e( 'Remember Me', 'theme-my-login' ); ?></label>
            </p>

            <p class="tml-submit-wrap">
                <input type="submit" name="wp-submit" id="wp-submit<?php $template->the_instance(); ?>" value="<?php esc_attr_e( 'Log In', 'theme-my-login' ); ?>" />
                <input type="hidden" name="redirect_to" value="<?php $template->the_redirect_url( 'login' ); ?>" />
                <input type="hidden" name="instance" value="<?php $template->the_instance(); ?>" />
                <input type="hidden" name="action" value="login" />
            </p>
        </div>
    </form>
    <?php $template->the_action_links( array( 'login' => false ) ); ?>
</div>

Vaše odpověď


Prosím používejte diakritiku a interpunkci.

Ochrana proti spamu. Napište prosím číslo dvě-sta čtyřicet-sedm:

0