Wordpress barcode - weird page position

I created shortcode in my child themes functions.php. shortcodeas follows:

function add_login_form() {
if ( is_user_logged_in() )
{
    echo 'Witaj zalogowany';
}
else 
{
    wp_login_form();
}
}
add_shortcode('login_form', 'add_login_form');

I added a short code [login_form]to my website (test area): http://s540141209.domenaklienta.pl/wordpress/konto-klienta/

It is added to the site after the text: "TUTAJ POWINIEN BYĆ LOGIN FORM LUB NAPIS" WITAJ ZALOGOWANY "!"

It should be inside the first div: <div class="et_pb_row">

But it is displayed immediately after the page title. Do you know why this is happening?

Thansk in advance. But this happens to show everything on the website.

+4
source share
1 answer

. http://codex.wordpress.org/Shortcode_API , . , . , , , , .

function add_login_form() {
if ( is_user_logged_in() )
{
    return 'Witaj zalogowany';
}
else 
{
    return wp_login_form(array('echo'=>false));
}
}
add_shortcode('login_form', 'add_login_form');

wp_login_form . http://codex.wordpress.org/Function_Reference/wp_login_form.

+6

All Articles