This topic has 18 replies, 2 voices, and was last updated 5 years by Radu.

  • Author
  • #216640
     PcMaxx
    Participant

    Redirect Signup and Create Account to Paid Membership Pro instead of a double sign-up.

    The directions here don’t work, as the lines of code don’t exist in the current header.php

    https://archived.seventhqueen.com/sweetdate/article/replace-login-sign-url-custom-url

    Once the member wants to signup they should go directly to the membership page to pick their membership package.  How is this done?

    #216668
     Radu
    Moderator

    Hi,

    There was a snippet code on the forum that will lock non-paying members into levels page until they buy but i cannot found under search in forum, you can try to search for it using this keyworks, lock member , memberships.

    PS: found it

    COPY CODE
    
    
    add_action( 'template_redirect', 'my_membersip_restrict' );
     
    function my_membersip_restrict() {
        global $pmpro_pages, $post;
     
        if ( is_user_logged_in() && !pmpro_hasMembershipLevel() ) {
            if (isset($post->ID) && !in_array($post->ID, $pmpro_pages)) {
                wp_redirect( pmpro_url() );
            }
        }
    }
    

    Cheers
    R

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #216693
     PcMaxx
    Participant

    Does this go in the functions.php? Will this also bypass the Modal?

    #216737
     Radu
    Moderator

    yes in functions.php

    yes

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #216755
     PcMaxx
    Participant

    HI Radu,

    It did work. The Modal popped and it didn’t populate in Paid Membership Pro. I like the signup to go directly to the Membership options page here. https://swingventure.com/membership-account/membership-levels/

    Thanks. Let me know what I need to do to make this work.

    #216772
     Radu
    Moderator

    Hi, in this case change directly the link from top menu.

    To change the create an account link, follow these steps:

    Go to wp-content/themes/sweetdate/page-parts and copy the file general-login-modal.php
    Now go to wp-content/themes/sweetdate-child/ create a folder and name it page-parts and then paste general-login-modal.php there.

    Edit general-login-modal.php and find:

    COPY CODE
    
    <a href="#"><?php _e("CREATE NEW ACCOUNT", 'kleo_framework');?></a>
    

    Replace with

    COPY CODE
    
    <a href="URL TO YOUR MEMBERSHIPS LEVEL PAGE"><?php _e("CREATE NEW ACCOUNT", 'kleo_framework');?></a>
    

    And add the url

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #216776
     PcMaxx
    Participant

    I saw this but couldnt find it in the Sweetdate theme when I ftp

    #216788
     PcMaxx
    Participant

    Nevermind.. Found it. I’ll try it next.

    #216817
     Radu
    Moderator

    Great
    Cheers
    R

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #216842
     PcMaxx
    Participant

    Hi Radu,

    I was mistaken. This link above is not in that file. Is this the line I change? <a href="#" data-reveal-id="register_panel" class="radius secondary small button"><?php _e("CREATE NEW ACCOUNT", 'kleo_framework');?></a></span><?php } ?>

    Below is the complete code I see in the file. That exact line isn’t in there. Tho, one very close.

    COPY CODE
    <div id="login_panel" class="reveal-modal">
      <div class="row">
        <div class="twelve columns">
          <h5><i class="icon-user icon-large"></i> <?php _e("SIGN INTO YOUR ACCOUNT", 'kleo_framework');?><?php if(get_option('users_can_register')) { ?> <span class="subheader right small-link"><a href="#" data-reveal-id="register_panel" class="radius secondary small button"><?php _e("CREATE NEW ACCOUNT", 'kleo_framework');?></a></span><?php } ?></h5>
        </div>
          <form action="<?php echo wp_login_url(apply_filters('kleo_modal_login_redirect', '')  ); ?>" id="login_form" name="login_form" method="post" class="clearfix">
          <div class="six columns">
            <input type="text" id="username" required name="log" class="inputbox" value="" placeholder="<?php _e("Username", 'kleo_framework');?>">
          </div>
          <div class="six columns">
            <input type="password" id="password" value="" required name="pwd" class="inputbox" placeholder="<?php _e("Password", 'kleo_framework');?>">
          </div>
          <p class="twelve columns">
              <label>
                  <input type="checkbox" value="forever" name="rememberme" id="rememberme"> <?php _e( "Remember me", "kleo_framework" ); ?>
              </label>
            <small>
                <i class="icon-lock"></i>
                <?php
                if( sq_option('privacy_page', '#') != "#" && sq_option('privacy_page', '#') != '' ) {
                    $privacy_page_id = sq_option('privacy_page');
                    /* WPML compatibility */
                    if ( function_exists( 'icl_object_id' ) ) {
                        $privacy_page_id = icl_object_id( $privacy_page_id, 'page', true );
                    }
                    $privacy_link = get_permalink( $privacy_page_id );
                    printf( __( 'Your <a href="%s" target="_blank">privacy</a> is important to us and we will never rent or sell your information.', 'kleo_framework' ), $privacy_link );
                }
                ?>
            </small>
              <div class="login-form-hook">
                <?php do_action('login_form');?>
              </div>
          </p>
          <div class="twelve columns">
            <button type="submit" id="login" name="wp-submit" class="radius secondary button"><i class="icon-unlock"></i> &nbsp;<?php _e("LOG IN", 'kleo_framework');?></button> &nbsp; 
            <?php do_action('fb_popup_button'); ?>
          </div>
        </form>
        <div class="twelve columns"><hr>
          <ul class="inline-list">
            <li><small><a href="#" data-reveal-id="forgot_panel"><?php _e("FORGOT YOUR USERNAME OR PASSWORD?", 'kleo_framework');?></a></small></li>
          </ul>
        </div>
      </div><!--end row-->
      <a href="#" class="close-reveal-modal">×</a>
    </div>
    
    #217059
     Radu
    Moderator

    Hi,

    Add the link there :

    Also if the button has no effect when you click, it should do, delete also the data-reveal-id=”register_panel” next to marked spot in screenshot.

    Cheers
    R

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #217269
     PcMaxx
    Participant

    Hey there. Any luck by chance on that button?

    #217289
     PcMaxx
    Participant

    Hey Radu,

    This actually completely made Modal stop working. The Modal pops up, but no longer logs in. I’ll have to pull that out so at least it works. Anything else we can do here?

    #217312
     Radu
    Moderator

    Hi,

    I think i had made a mistake, there it’s login panel, it should be done into register panel.

    I will get back to you soon.

    Cheers
    R

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #217313
     Radu
    Moderator

    So revert all above changes that stops login pop-up to works, and instead use this method, i’ve made a mistake i offered instructions to change the login link not the register, follow the above.

    Go to wp-content/themes/sweetdate/page-parts and copy the file general-login-modal.php
    Now go to wp-content/themes/sweetdate-child/ create a folder and name it page-parts and then paste general-header.php there.

    Edit general-header.php and find:

    Replace with

    Cheers
    R

    #217574
     PcMaxx
    Participant
    This reply has been set as private.
    #217622
     Radu
    Moderator

    Hi,

    Removing completely the data-reveal-id=”registerpanel” does the trick, that prevents pages to change the page.
    Use the next, let me know.
    For me it works to click i’ve tested and i opens your website levels page.

    COPY CODE
    
    <?php
    /**
     * General header section
     *
     * @package SweetDate
     */
    
    ?>
    
    <!-- HEADER SECTION ================================================ -->
    <header>
        <div class="header-bg clearfix">
    
            <?php if ( sq_option( 'social_top' ) == 1 ) : ?>
                <!--Top links-->
                <div class="top-links">
                    <div class="row">
                        <ul class="no-bullet">
                            <li class="nine columns">
                                <?php do_action( 'kleo_before_top_links' ); ?>
    
                                <?php if ( sq_option( 'phone_on_top' ) ): ?>
                                    <?php if ( sq_option( 'owner_phone' ) ): ?>
                                        <a class="phone-top" href="tel:<?php echo sq_option( 'owner_phone' ); ?>">
                                            <i class="icon-phone"></i>   <?php echo sq_option( 'owner_phone' ); ?>
                                        </a>
                                          
                                    <?php endif; ?>
                                <?php endif; ?>
    
                                <?php if ( sq_option( 'owner_email' ) ): ?>
                                    <a class="mail-top" href="mailto:<?php echo sq_option( 'owner_email' ); ?>">
                                        <i class="icon-envelope"></i>   <?php echo sq_option( 'owner_email' ); ?>
                                    </a>
                                <?php endif; ?>
    
                            </li>
    
                            <li class="three columns hide-for-small">
                                <?php _e( "Find us on", 'kleo_framework' ); ?>:  
                                <?php if ( sq_option( 'twitter' ) ): ?>
                                    <a href="<?php echo sq_option( 'twitter' ); ?>" class="has-tip tip-bottom"
                                       data-width="210" target="_blank"
                                       title="<?php _e( "Follow us on", 'kleo_framework' ); ?> Twitter">
                                        <i class="icon-twitter icon-large"></i>
                                    </a>
                                <?php endif; ?>
                                <?php if ( sq_option( 'facebook' ) ): ?>
                                    <a href="<?php echo sq_option( 'facebook' ); ?>" class="has-tip tip-bottom"
                                       data-width="210" target="_blank"
                                       title="<?php _e( "Find us on", 'kleo_framework' ); ?> Facebook">
                                        <i class="icon-facebook icon-large"></i>
                                    </a>
                                <?php endif; ?>
                                <?php if ( sq_option( 'instagram' ) ): ?>
                                    <a href="<?php echo sq_option( 'instagram' ); ?>" class="has-tip tip-bottom"
                                       data-width="210" target="_blank"
                                       title="<?php _e( "Follow us on", 'kleo_framework' ); ?> Instagram">
                                        <i class="icon-instagram icon-large"></i>
                                    </a>
                                <?php endif; ?>
                                <?php if ( sq_option( 'youtube' ) ): ?>
                                    <a href="<?php echo sq_option( 'youtube' ); ?>" class="has-tip tip-bottom"
                                       data-width="210" target="_blank"
                                       title="<?php _e( "Follow us on", 'kleo_framework' ); ?> Youtube">
                                        <i class="icon-youtube icon-large"></i>
                                    </a>
                                <?php endif; ?>
                                <?php if ( sq_option( 'googleplus' ) ): ?>
                                    <a href="<?php echo sq_option( 'googleplus' ); ?>" class="has-tip tip-bottom"
                                       data-width="210" target="_blank"
                                       title="<?php _e( "Find us on", 'kleo_framework' ); ?> Google+">
                                        <i class="icon-google-plus icon-large"></i>
                                    </a>
                                <?php endif; ?>
                                <?php if ( sq_option( 'pinterest' ) ): ?>
                                    <a href="<?php echo sq_option( 'pinterest' ); ?>" class="has-tip tip-bottom"
                                       data-width="210" target="_blank"
                                       title="<?php _e( "Pin us on", 'kleo_framework' ); ?> Pinterest">
                                        <i class="icon-pinterest icon-large"></i>
                                    </a>
                                <?php endif; ?>
                                <?php if ( sq_option( 'linkedin' ) ): ?>
                                    <a href="<?php echo sq_option( 'linkedin' ); ?>" class="has-tip tip-bottom"
                                       data-width="210" target="_blank"
                                       title="<?php _e( "Find us on", 'kleo_framework' ); ?> LinkedIn">
                                        <i class="icon-linkedin icon-large"></i>
                                    </a>
                                <?php endif; ?>
    
                                <?php do_action( 'kleo_extra_social_icons' ); ?>
                            </li>
                        </ul>
                    </div>
                </div>
                <!--end top-links-->
            <?php endif; ?>
    
            <div id="header">
                <div class="row">
    
                    <!-- Logo -->
                    <div class="four columns">
                        <div id="logo"><?php bloginfo( 'name' ); ?>
                            <a href="<?php echo get_home_url(); ?>">
                                <img id="logo_img"
                                     src="<?php echo sq_option( 'logo', get_template_directory_uri() . '/assets/images/logo.png' ); ?>"
                                     width="294" height="108" alt="<?php bloginfo( 'name' ); ?>">
                            </a>
                        </div>
                    </div>
                    <!--end logo-->
    
                    <!-- Login/Register/Forgot username/password Modal forms
                        -  Hidden by default to be opened through modal
                        -  For faster loading we put all forms at the bottom of page -->
    
                    <!--Login buttons-->
                    <div class="eight columns login-buttons">
                        <ul class="button-group radius right">
                            <?php if ( is_user_logged_in() ): ?>
    
                                <?php if ( function_exists( 'bp_is_active' ) ): ?>
                                    <?php
                                    $profile_menu = array();
                                    if ( bp_is_active( 'activity' ) ) {
                                        $profile_menu['activity'] = '<li><a href="' . bp_loggedin_user_domain() . 'activity/">' . __( "Activity", "buddypress" ) . '</a></li>';
                                    }
    
                                    if ( bp_is_active( 'messages' ) ) {
                                        $profile_menu['messages'] = '<li><a href="' . bp_loggedin_user_domain() . 'messages/">' . __( "Messages", "buddypress" ) . ' <small class="label">' . messages_get_unread_count() . '</small></a></li>';
                                    }
    
                                    if ( bp_is_active( 'friends' ) ) {
                                        $profile_menu['friends'] = '<li><a href="' . bp_loggedin_user_domain() . 'friends/requests">' . __( "Friend requests", 'kleo_framework' ) . ' <small class="label">' . bp_friend_get_total_requests_count() . '</small></a></li>';
                                    }
    
                                    if ( bp_is_active( 'groups' ) ) {
                                        $profile_menu['groups'] = '<li><a href="' . bp_loggedin_user_domain() . 'groups/">' . __( "Groups", "buddypress" ) . '</a></li>';
                                    }
    
                                    if ( bp_is_active( 'settings' ) ) {
                                        $profile_menu['settings'] = '<li><a href="' . bp_loggedin_user_domain() . 'settings/">' . __( "Settings", "buddypress" ) . '</a></li>';
                                    }
    
                                    $profile_menu = apply_filters( 'header_profile_dropdown', $profile_menu );
                                    ?>
    
                                    <li class="relative btn-profile">
    
                                        <?php if ( ! empty( $profile_menu ) ) { ?>
                                        <div href="#" class="tiny secondary button split dropdown"
                                             data-options="is_hover:true">
                                            <?php } ?>
    
                                            <a href="<?php bp_loggedin_user_link(); ?>"
                                               class="tiny secondary button radius">
                                                <i class="icon-user hide-for-medium-down"></i>
                                                <?php _e( "PROFILE", 'kleo_framework' ); ?>
                                            </a>
                                            <span></span>
                                            <div class="kleo-notifications">
                                                <?php if ( bp_is_active( 'messages' ) && messages_get_unread_count() > 0 ) { ?>
                                                    <a href="<?php echo bp_loggedin_user_domain() . 'messages/'; ?>"
                                                       data-width="210"
                                                       title="<?php _e( "New messages", 'kleo_framework' ); ?>"
                                                       class="kleo-message-count has-tip tip-left"><?php echo messages_get_unread_count(); ?></a><?php } ?><?php if ( bp_is_active( 'friends' ) && bp_friend_get_total_requests_count() > 0 ): ?>
                                                    <a href="<?php echo bp_loggedin_user_domain() . 'friends/requests'; ?>"
                                                       data-width="210"
                                                       title="<?php _e( "Friend requests", 'kleo_framework' ); ?>"
                                                       class="kleo-friends-req has-tip tip-right">
                                                        <?php echo bp_friend_get_total_requests_count(); ?>
                                                    </a>
                                                <?php endif; ?>
                                            </div>
                                            <ul>
                                                <?php
                                                if ( ! empty( $profile_menu ) ) {
                                                    foreach ( $profile_menu as $prm ) {
                                                        echo $prm;
                                                    }
                                                }
                                                ?>
                                            </ul>
    
                                            <?php if ( ! empty( $profile_menu ) ) { ?>
                                        </div>
                                    <?php } ?>
    
                                    </li>
                                <?php endif; ?>
    
                                <li>
                                    <a href="<?php echo wp_logout_url( get_bloginfo( 'url' ) ); ?> "
                                       class="tiny button radius btn-logout">
                                        <i class="icon-off hide-for-medium-down"></i>
                                        <?php _e( "LOG OUT", 'kleo_framework' ); ?>
                                    </a>
                                </li>
    
                            <?php else: ?>
    
                                <li class="header-login-button">
                                    <a href="#" data-reveal-id="login_panel" class="tiny secondary button radius">
                                        <i class="icon-user hide-for-medium-down"></i>
                                        <?php _e( "LOG IN", 'kleo_framework' ); ?>
                                    </a>
                                </li>
    
                                <?php if ( get_option( 'users_can_register' ) ) { ?>
                                    <li class="header-register-button">
                                        <a href="https://swingventure.com/membership-account/membership-levels/" class="tiny button radius">
                                            <i class="icon-group hide-for-medium-down"></i>
                                            <?php _e( "SIGN UP", 'kleo_framework' ); ?>
                                        </a>
                                    </li>
                                <?php } ?>
    
                            <?php endif; ?>
                        </ul>
                    </div>
                    <!--end login buttons-->
    
                    <!-- Main Navigation -->
                    <div class="eight columns">
                        <div class="contain-to-grid<?php if ( sq_option( 'sticky_menu', 1 ) == 1 ) {
                            echo ' sticky';
                        } ?>">
                            <nav class="top-bar">
                                <a href="<?php echo get_home_url(); ?>" class="small-logo"><img
                                            src="<?php echo sq_option( 'small_logo', get_template_directory_uri() . '/assets/images/small_logo.png' ); ?>"
                                            height="43" alt="<?php bloginfo( 'name' ); ?>"></a>
                                <ul>
                                    <!-- Toggle Button Mobile -->
                                    <li class="name">
                                        <h1><a href="#"><?php _e( "Please select your page", 'kleo_framework' ); ?></a>
                                        </h1>
                                    </li>
                                    <li class="toggle-topbar"><a href="#"><i class="icon-reorder"></i></a></li>
                                    <!-- End Toggle Button Mobile -->
                                </ul>
    
                                <section><!-- Nav Section -->
                                    <?php wp_nav_menu( array(
                                        'container'      => false,
                                        'menu_class'     => 'left',
                                        'theme_location' => 'primary',
                                        'fallback_cb'    => 'sweetdate_main_nav',
                                        'walker'         => new sweetdate_walker_nav_menu
                                    ) );
                                    ?>
                                </section><!-- End Nav Section -->
                            </nav>
                        </div><!--end contain-to-grid sticky-->
                    </div>
                    <!-- end Main Navigation -->
                </div><!--end row-->
    
                <?php if ( sq_option( 'home_rev', 0 ) == 1 && function_exists( 'putRevSlider' ) ) : /*Fix for Safari on MacOs */ ?>
    
            </div><!--end #header-->
    
        <?php endif; ?>
    
            <div class="row just-after-header">
                <?php
                /**
                 * after_header_content
                 *
                 * @hooked render_user_search - only if is Front-page Template
                 */
                do_action( 'after_header_content' );
                ?>
            </div>
    
            <?php if ( sq_option( 'home_rev', 0 ) == 0 ) : /*Fix for Safari on MacOs */ ?>
    
        </div><!--end #header-->
    
        <?php endif; ?>
    
        <?php
        /**
         * kleo_after_header
         *
         */
        do_action( 'kleo_after_header' );
        ?>
        </div><!--end header-bg-->
    </header>
    <!--END HEADER SECTION-->
    

    Cheers
    R

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #217670
     PcMaxx
    Participant

    Yup. That worked.

    #217693
     Radu
    Moderator

    Great
    Cheers
    R

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
Viewing 19 posts - 1 through 19 (of 19 total)

You must be logged in to reply to this topic.

Log in with your credentials

Forgot your details?