This topic has 10 replies, 3 voices, and was last updated 10 years by SQadmin.

  • Author
  • #2050
     bastkopf
    Participant

    Hey support,

    I read the whole support here and I have to say I am impressed. I dont think I have ever seen such a responsive and friendly support, answering even questions which go off-topic sometimes. This shows me it was a good decision to purchase the theme (sweet date) – go ahead like this and you wont have any problems selling themes and things alike.

    However, the reason I read the whole support page was that I was looking for the following: I want the registration form at the homepage for not signed in members – but for the signed in ones, I would like to have neither the search nor the register box, but some other things instead (not related to this post). I saw a post talking about this before, but unfortunately I didnt understand what was the solution for the problem (it seems you made the header smaller?). I dont know much about programming AND I am new to wordpress as well. I read the instructions (which are great, by the way) and I was able to set the homepage static and all these things – just this little thing is missing so far in my workflow.

    I`d love if you could give me a hand with this.

    Thanks again for the work you do here!

    Phillip

    #2068
     SQadmin
    Keymaster

    Hello,
    Thank you very much for the kind words.

    To have the registration box for non-logged in users you can set the form to Mixed in WP Admin -> Sweetdate -> Homepage
    But this setting will have the search form for logged-in users. To change the form to something else you need to modify the template file located in wp-content/themes/sweetdate/page-parts/home-search-form.php
    This will require HTML knowledge or PHP depending on what you need to show there.

    Make sure to do all file changes using the sweetdate-child theme:
    To modify the template above, copy that file to wp-content/themes/sweetdate-child/page-parts/home-search-form.php and do all the changes there.

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

    Hi,

    Thanks for the fast reply. So you say without HTML or PHP knowledge it is not possible to just remove the search form from the logged in home page? That is a pity since I have no plan where even to start in the files you have mentioned.
    But thanks for the try, I would really welcome an easier option to do this in an update maybe? 🙂
    Thanks

    #2093
     SQadmin
    Keymaster

    Oh. you can remove it. I thought you wan to show something else in the exact same location, but you can remove it and build the page with shortcodes.
    To remove it add this snippet to wp-content/themes/sweetdate-child/functions.php

    COPY CODE
    
    add_action('after_setup_theme','remove_search_form',11);
    function remove_search_form() {
        remove_action('after_header_content','render_user_search');
    }
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #2102
     bastkopf
    Participant

    Great! Thanks a million 🙂 So if I can remove this “so easy”, is it as well possible to completely separate the registration page and the homepage (after login)? As in: Clean registration site, no forums and nothing, then after log in they see basically a “second homepage” with complete different content?

    As in this post:
    https://archived.seventhqueen.com/forums/topic/redirect-after-login

    But I quite dont understand where to put these things.

    Great if you could help out and many thanks! It seems like you guys never take a break, appreciate this!

    #2105
     SQadmin
    Keymaster

    You can differentiate content in pages with these 2 shortcodes:
    [kleo_only_members]Content to show for members only[/kleo_only_members]
    [kleo_only_guests]Content to show for guests only[/kleo_only_guests]

    This code is used to redirect to the last page user was viewing. Add this to the file located on your server at wp-content/themes/sweetdate-child/functions.php

    COPY CODE
    
    add_filter('login_redirect', 'redirect_previous_page', 10);
     
    function redirect_previous_page(){
        $request = $_SERVER["HTTP_REFERER"];
        $req = explode(get_option('siteurl'),$request);
        if (isset($req[1])){
            $redirect = site_url( $req[1], 'login_post' );
        } else {
            $redirect = site_url( '', 'login_post' );
        }
     
     
        return $redirect;
    }
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #2109
     bastkopf
    Participant

    That means if I want to hide a specific part from not logged in users, say this:

    [kleo_h1]It all starts with a [kleo_colored_text color=”#1e73be”] Click [/kleo_colored_text][/kleo_h1]

    Then I just put this part of the codes around it? As in:

    [kleo_only_members]
    [kleo_h1]It all starts with a [kleo_colored_text color=”#1e73be”] Click [/kleo_colored_text][/kleo_h1]
    [/kleo_only_members]

    Is that right? If yes, its just awesome!

    What do you mean with the last page a user had been looking at? You mean if sombody logs in, then he wont see the homepage but the last page he visited, as e.g. his profile?

    Thanks again 🙂

    #2117
     SQadmin
    Keymaster

    That is right, and if you want conteny only for guests use kleo_only_guests shortcode.
    I mean that after login you will be redirected to the the page you previously were.

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

    Thanks, that solves this one. Thank you so much!

    #7427
     vanaila
    Participant

    Hi, what have we to put to remove register form.

    I tried this, but it doesn’t work:

    add_action('after_setup_theme','remove_registration_form',11);
    function remove_registration_form() {
    remove_action('after_header_content','render_registration_form');
    }

    I tried with render_registration_user too

    #7484
     SQadmin
    Keymaster

    I don’t know where do you have the code from but there is no render_registration_form
    You need to change it to: render_user_register
    Also that can be disabled from Sweetdate – Homepage

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

The forum ‘Sweetdate – WordPress’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?