Login

Writer, blogging theme for writers and authors | Support forum.
GK User
Thu Oct 30, 2014 4:24 pm
Hey one more question...

How can I connect my account plugin with this this theme?
User avatar
Senior Boarder

GK User
Thu Oct 30, 2014 11:22 pm
Could you please provide an URL to this plugin?
User avatar
Moderator

GK User
Fri Oct 31, 2014 10:03 am
User avatar
Senior Boarder

GK User
Fri Oct 31, 2014 10:08 am
I didn't test this plugin, but it's simple popup login/registration plugin, where is the problem exactly?
User avatar
Moderator

GK User
Fri Oct 31, 2014 10:10 am
I do not know how to link it and make it functional with the login icon at the top right.
User avatar
Senior Boarder

GK User
Fri Oct 31, 2014 10:30 am
I can see in the plugin documentation, that you can use widget, shortcode or php function to add login link, so please use php function and replace the existing login link from Writer/sidebar.php file:

Code: Select all
<a href="<?php echo wp_login_url( get_permalink() ); ?>" id="gk-login-btn" class="gk-icon-user"><?php (!is_user_logged_in()) ? _e('Log in', 'cloudhost') : _e('Logout', 'cloudhost'); ?></a>


Regarding the function needed, please contact with your plugin support.
User avatar
Moderator

GK User
Fri Oct 31, 2014 11:13 am
This is the Login Manual:

1.4 Adding Login and Register Links Using
Shortcode

You can use the [modal_login] shortcode in within edit screen of posts,
pages and custom post types. Inset the shortcode and click “Update”.

Display login form:
[modal_login login_text="Login" logout_text="Logout"]
login_text The text for the login link, defaults to 'Login'.
logout_text The text for the logout link, default 'Logout'.

Display register form:
[modal_login form= ”register” register_text="Register"
logged_in_text="You are already logged in"]

register_text The text for the register link, defaults to 'Register'.
logged_in_text The text for already logged in user, defaults to 'You are
already registered and logged in'.
form=“register” The modal will open directly to register form.

I have found the PHP line you mentioned, however, it is a little bit to complicated to implement for me.

I hope you can help me out.

Regards...
User avatar
Senior Boarder

GK User
Fri Oct 31, 2014 12:45 pm
This is shortcode, do you have another php function? I think you should contact with your plugin support and ask how you can add the login/register form into php files.
User avatar
Moderator

GK User
Fri Oct 31, 2014 2:34 pm
Sorry wrong chapter, herewith the PHP instructions...

1.5 Adding Login Link Using a PHP Code

Add the following PHP function within your template files:
<?php
add_modal_login_link();
?>

Display login form:
<?php
add_modal_login_link($login_text
=
'Login',

$logout_text
=
'Logout',

$show_admin
=
true);
?>

$login_text | String | The text for the login link, defaults to 'Login'.

$logout_text | String | The text for the logout link, default 'Logout'.

$show_admin | Bool | The setting to display the link to admin area when
logged in, default is set to 'false'.

Display register form:
<?php
add_modal_login_link($form
=
'register'

$register_text
=
'Register',
$logged_in_text
= 'You are already logged in'); ?>

$register_text | String | The text for the register link, defaults to 'Register'.

$logged_in_text | String | The text for already logged in user, defaults to
'You are already registered and logged in'.

$form | String | register | The modal will open directly to register
form.
User avatar
Senior Boarder

GK User
Mon Nov 03, 2014 10:21 am
Instead of the fragment from sidebar.php (my previous post) you can use this code:

Code: Select all
<?php
add_modal_login_link();
?>


but in this case, the icon won't be visible anymore, you have to check which class is added to this link from the plugin and change the css and probably js code resposible for the popup. You should ask this your plugin support (like I said before), you can show the fragment of code which is now responsible for this login button.
User avatar
Moderator


cron