Hello,
I would like to have Login/Register option enabled in the theme template but when user click on it i would like to show UserPro in pop-up or as a Login page.
I suppose that i could include some php code or shortcode, but i can’t fid where.
Where and how should i insert shortcode/php code to call UserPro Login/Register ?
Thanks in advance, Marcin.
edit Newsmag/parts/header/top-menu.php
line 119 : ” <ul class=”top-header-menu td_ul_login”><li class=”menu-item”>‘ . __td(“Sign in / Join”) . $td_user_join . ‘<span class=”td-sp-ico-login td_sp_login_ico_style”></span> ”
for
<ul class=”top-header-menu td_ul_login”><li class=”menu-item”>Sign in / Join
work for me lol
Oliver23,
one mor thing. This code you replace i have in line 60:
<ul class=”top-header-menu td_ul_login”><li class=”menu-item”>‘ . __td(“Sign in / Join”) . $td_user_join . ‘<span class=”td-sp-ico-login td_sp_login_ico_style”></span>
try this to see if work for you ? copy and paste the all top menu code:
<?php if (td_util::get_option(‘tds_top_bar’) != ‘hide_top_bar’) { ?>
<div class=”td-header-sp-top-menu”>
<?php
if (td_util::get_option(‘tds_data_top_menu’) == ‘show’) {
$tds_data_time = td_util::get_option(‘tds_data_time_format’);
if ($tds_data_time == ”) {
$tds_data_time = ‘l, F j, Y’;
}
echo ‘<div class=”td_data_time”>’;
echo date_i18n(stripslashes($tds_data_time));
echo ‘</div>’;
}
//show login widget
if (td_util::get_option(‘tds_login_sign_in_widget’) == ‘show’) {
//test if user is logd in or not
if ( is_user_logged_in() ) {
//get current logd in user data
global $current_user;
//<span class=”td-sp-ico-logout”></span>
echo ‘<ul class=”top-header-menu td_ul_logout”>
<li class=”menu-item”>’ .
get_avatar($current_user->ID, 20) . ‘‘ . $current_user->display_name . ‘<i class=”td-icon-logout”></i>’ .
‘
<li class=”menu-item”>
‘ . __td(“Logout”) . ‘
‘;
} else {
//check if admin allow registration
$users_can_register = get_option(‘users_can_register’);
//if admin permits registration
$users_can_register_tab = ”;
$users_can_register_form = ”;
$td_user_join = ”;
if($users_can_register == 1){
//add the Register tab to the modal window if Anyone can register chec
$users_can_register_tab = ‘
‘;
//add the Join text
//$td_user_join = ‘ / ‘ . __td(“JOIN”);
$users_can_register_form = ‘
<div id=”td-register-div” class=”td-dispaly-none”>
<div class=”td-login-panel-title”>’ . __td(“Register for an account”) .'</div>
<input class=”td-login-input” type=”text” name=”register_email” id=”register_email” placeholder=”‘ . __td(“your email”) .'” value=”” required>
<input class=”td-login-input” type=”text” name=”register_user” id=”register_user” placeholder=”‘ . __td(“your username”) .'” value=”” required>
<input type=”button” name=”register_button” id=”register_button” class=”wpb_button btn td-login-button” value=”‘ . __td(“Register”) . ‘”>
<div class=”td-login-info-text”>’ . __td(“A password will be e-mailed to you.”) . ‘</div>
</div>’;
}
echo ‘
<ul class=”top-header-menu td_ul_login”><li class=”menu-item”>Sign in / Join
‘;
}
}
//end login window
if (td_util::get_option(‘tds_top_menu’) != ‘hide’) {
//shows top menu
wp_nav_menu( array(
‘theme_location’ => ‘top-menu’,
‘menu_class’ => ‘top-header-menu’,
‘fallback_cb’ => ‘td_wp_top_menu’,
‘container_class’ => ‘menu-top-container’
) );
//if no top menu is set show link to create new menu
function td_wp_top_menu() {
echo ‘<ul class=”top-header-menu”>’;
echo ‘<li class=”menu-item-first”>Click here – to select or create a menu‘;
echo ‘‘;
}
}
?>
</div>
<?php } ?>
HI,
my e-mail address is info@okti.pl
I checked your code again and can’t understand how do you call UserPro lofin form with this code.