WordPress.org

Ready to get started?Download WordPress

Forums

SimpleModal Login
Simplemodal as menu link (4 posts)

  1. Maraki
    Member
    Posted 1 year ago #

    Hello,

    What do i need to do to use Simple modal plugin as link on my menu?

    The link will be called "Login" and when the user clicks it the popup shows.

    what's the code i need?

    many thanks,
    Andy

    http://wordpress.org/extend/plugins/simplemodal-login/

  2. anandshahil11
    Member
    Posted 1 year ago #

    hi all,

    i am also facing the same issue. I have header.php in which i have login menu. when i should click that , it display the login form.
    Log In .

    the strange thing is this plugin works with other themes but its not working with my theme.
    i can see in firebug that jquery.simplemodal.js , default.js & jquery.js but with 304 not modified http status.

    i donno what is going wrong?
    Any help ?

    thanks,
    Anand

  3. masumm17
    Member
    Posted 1 year ago #

    Hello Andy,

    I used this code to add class "simplemodal-login". It may help you

    //Conditional classes
    add_filter('nav_menu_css_class' , 'special_nav_class' , 10 , 2);
    function special_nav_class($classes, $item){
        //replace "login with your login linkt title[must in lower case]"
        if(strpos(strtolower($item->title), 'login') !== false){$classes[] = 'simplemodal-login';}
    
        return $classes;
    }
  4. SadafChohan
    Member
    Posted 1 year ago #

    I simply installed the plugin and just in my header.php used the following code
    ` <a href="<?php echo bloginfo('url'); ?>/wp-login.php?redirect_to=<?php echo bloginfo('url'); ?>" class="simplemodal-login">Log In</a> |
    <a href="<?php echo bloginfo('url'); ?>/wp-login.php?action=register" class="simplemodal-register">Register</a>`
    i used the code in header.php as i want my link to be shown on the top

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.