WordPress.org

Ready to get started?Download WordPress

Forums

WP Login Box
positioning... (15 posts)

  1. jcpcosta
    Member
    Posted 11 months ago #

    Hi Liv.

    I got another doubt...when installing this plugin where does it write HTML? I'm asking because I want to position login boxes over the header and I think it added HTML outside of the header area...

    Would you please help?? Thank you!

    http://wordpress.org/extend/plugins/wp-login-box/

  2. Ziv
    Member
    Plugin Author

    Posted 11 months ago #

    The plugin places the HTML code inside the HTML tag that you added the php loginbox call to. So if you put the php loginbox in your header div it should look something like this:

    <div id="header">
    <?php
        if(function_exists('wplb_login')) {
            wplb_login();
        }
    ?>
    </div>

    The HTML will be placed inside your header div. If you could link me to your site, I could check if the HTML is actually being palced in the correct HTML div tag. If you are going to link me your site, please also let me know in which HTML tag you placed the php loginbox call.

  3. jcpcosta
    Member
    Posted 11 months ago #

    Hi Ziv!

    I just realized I called you Liv, sorry for that :P

    About the code, well I don't know what's happening...I've pasted
    <?php
    if(function_exists('wplb_login')) {
    wplb_login();
    }
    ?>

    into the header.php theme file BUT now login box still shows but I can't find the code in that file???????????????? lol Is this possible??

    URL site is http://mlearning.mdsinsure.com/

    Thank you for your help!

  4. jcpcosta
    Member
    Posted 11 months ago #

    Hi again!

    Found the code..lol..I went through such a big mess :P sorry for that.

    So the code is in header.php inside the wrapper....

    <div id="wrapper">
    <?php if (function_exists ('wplb_login')) { wplb_login(); } ?>

  5. Ziv
    Member
    Plugin Author

    Posted 11 months ago #

    The wrapper is usually the div that holds together the entire site. Try to find another div inside the wrapper and place the php code there.

  6. jcpcosta
    Member
    Posted 11 months ago #

    Hi Ziv!

    I took the code from the wrapper and moved it to the body, opening the div "header". Then in the CSS inserts area of the theme I added the following changes as fields and links don't appear over the header:

    #wplb_wrap { position:relative; z-index: 1; padding-right: 350px; top:60px;
    }

    Horizontally they are ok now but vertically a huge white space has been added..I want fields to overlap header area!

  7. Ziv
    Member
    Plugin Author

    Posted 11 months ago #

    I'm not sure what you mean when you say horizontally or vertically. Maybe the whitespace is because of the padding or the margin you added? I am not too sure.

  8. jcpcosta
    Member
    Posted 11 months ago #

    I mean it's correctly aligned horizontally, where I want it to be :)

    I don't know, canĀ“t find it! But if I deactivate the plugin, white space disappears..seems there's some padding/margin/whatever..pushing down the entire site and I don't think it's has something to do with any of my changes...! I'm not a css/ php expert...so your help would be very kind!

  9. Ziv
    Member
    Plugin Author

    Posted 11 months ago #

    It's difficult for me to assist you without looking at your site. Do you mind sending me a link? If you don't want to send it in the public forum you can email it to me.

    My email is zivbarREPLACE_WITH_@ymail.com.
    Replace REPLACE_WITH_@ with @.

  10. jcpcosta
    Member
    Posted 11 months ago #

    I already gave it to you...post nr 3 :)

    http://mlearning.mdsinsure.com/

  11. Ziv
    Member
    Plugin Author

    Posted 11 months ago #

    Sorry, I missed it. I figured out what is causing the white space. Your design is in tables which means we can't post the code in a div, but we need to post it in the correct table row inside a td tag.
    Remove the extra css you added and change the login box align from right to left.
    Then put the php code right after the closing div tag for your search box div (all of this markup should be in header.php). This should fix your issue.

    So it will look something like this:

    <div class="searchbox">
    					<form method="get" class="searchform" action="http://protocolos.mdsinsure.com/mlearning/">
    					<div class="searchbox-form"><input type="text" class="text inputblur" onfocus="this.value=''" value="Pesquisa" onblur="this.value='Pesquisa'" name="s"></div>
    					</form>
    				</div>
    
           PHP LOGIN BOX CODE HERE
  12. jcpcosta
    Member
    Posted 11 months ago #

    Hi again Ziv!

    In my theme (Atahualpa) there's no code for the search box in file header.php.

    All code for the search is the file searchform.php so I tried to add your code there, like this:

    <form method="get" class="searchform" action="<?php echo esc_url( home_url() ); ?>/">
    <table class="searchform" cellpadding="0" cellspacing="0" border="0">
    <tr>
    <td class="searchfield">
    <input type="text" class="text inputblur" value="<?php esc_attr( the_search_query() ); ?>" name="s" />
    </td>
    <td class="searchbutton">
    <input name="submit" value="Search" type="image" src="<?php echo get_template_directory_uri(); ?>/images/magnifier2-gray.gif" style="display: block; border:none; padding: 0 0 0 5px; margin: 0;" />
    </td>
    </tr></table>
    <?php if (function_exists ('wplb_login')) { wplb_login(); } ?>
    </form>

    [Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum's parser.]

    Login box doesn't appear :(

  13. Ziv
    Member
    Plugin Author

    Posted 11 months ago #

    That's weird, the login box should appear. In your header.php try placing the php code after the first searchform.php call.

  14. jcpcosta
    Member
    Posted 11 months ago #

    there's no searchform call in header.php ... I asked for the theme's developers help too...

  15. Ziv
    Member
    Plugin Author

    Posted 11 months ago #

    Weird. Try looking for the get_search_form() function.

Reply

You must log in to post.

About this Plugin

About this Topic