-
Author
-
March 9, 2016 at 17:22 #109499gnkechioParticipant
Hello. Question: after a user logs out, how do I get the page to return to the register page? It currently shows content that I don’t want the unloged in user to see.
– Also, is there a way that I can limit access to the main menu? That is, to make it so that only logged-in users can see the main menu.
Thanks in advance for your time.
March 9, 2016 at 18:43 #109539RaduModeratorHi,
For the redirection ar actions like logout/login i recommend this plugin : https://wordpress.org/plugins/peters-login-redirect/
For the menu restriction only to logged users please upload this file (after you will unzip) general-header-section.php to wp-content/themes/kleo-child/page-parts/
Let me know
Cheers
Radu
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionAttachments:
You must be logged in to view attached files.March 9, 2016 at 20:29 #109591gnkechioParticipantHello. I have installed the Peters login redirect, and set up the restrictions for the various users and levels, but it’s still not working. It seems the site is not even recognizing the plugin. The restrictions that seem to work are the ones that I did from the theme options>miscellaneous page- but these are inadequate, as the user can still see the main menu and pages even after logging out.
After logging out, I want users to be redirected to the register page, where they originally signed in. But after logging out, this is the page that comes up:”http://www.mommysupermodel.com/home-2/?loggedout=true”.
– Also, I tried implementing the menu restriction using the general-header-section.php file like you suggested; but I couldn’t find the wp-content/themes/kleo-child/page-parts/ page. It keeps giving me a page 404 error.
Thanks in advance for any hints/suggestions.
March 10, 2016 at 15:57 #109761RaduModeratorHi,
If the peters redirect is seems that not works, make sure that the Login redirect for Popup* has WordPress Default option selected from wp-admin -> theme options -> Miscellaneous -> Login redirect for Popup*
Peters redirect FAQ here : https://wordpress.org/plugins/peters-login-redirect/faq/
For the the file that you have to put it in child, you need to have installed and activated the child theme, you will find it in theme package that you have downloaded from themeforest, then inside the kleo-child directory create a folder named page parts and in that folder you will have to upload that file.
Before installing Child theme i suggest you to export theme settings form the parent theme, Kleo, go to theme options -> import/export and export settings -> download data file.
Cheers
Radu
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionMarch 10, 2016 at 19:09 #109829gnkechioParticipantHello. I think I’ll leave out the peters-login-redirect plugin for now; I have done everything you suggested, but it still doesn’t work. In fact, I was able to get the redirect to work using the login redirect and the home page redirect. The only problem I have is what happens after the user logs out: after the user logs out, I would like the page to return to the home page from which they originally logged in. That is currently not the case: if a user logs out now, the screen stays on the last page that the user accessed while they were logged in. Thus, users who are not logged in can see the site’s content, if they had logged in earlier.
2. I also have a problem with one of our editors/contributors. When this contributor tries to add post an article (add new post), she gets this error message: Fatal error: Allowed memory size of 94371840 bytes exhausted (tried to allocate 6400 bytes) in /home/momsm/mommysupermodel.com/wp-admin/menu-header.php on line 161.
Thanks in advance for your help.
March 11, 2016 at 17:45 #109977RaduModeratorHi,
For the logged out redirection you can use this function that will redirect you to register page after logout.
COPY CODEadd_action( 'wp_logout', 'auto_redirect_external_after_logout'); function auto_redirect_external_after_logout(){ wp_redirect(site_url('register')); exit(); }
The function can be added to wp-content/themes/kleo-child/functions.php
Regarding to this error
Fatal error: Allowed memory size of 94371840 bytes exhausted (tried to allocate 6400 bytes) in
You have to increase your php memory limit, visit this url to see how : http://seventhqueen.com/blog/code-snippets/increase-php-memory-limit-in-wordpress.html
If the memory value doesn’t change contact your hosting company and ask them about this setting.
Cheers
Radu
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionMarch 14, 2017 at 12:34 #155598dtzinatoParticipantI also had the same problem with Peter’s login redirect. I’ve solved that problem (although a bit temperamental) by going to settings -> login/logout redirects -> all other users -> logout url, and adding /#.
Trouble is, once logged out and I hit the browser back button, it takes me back to the last page the user was logged in. I’m assuming there has to be a session cookie installed automatically?
March 14, 2017 at 19:55 #155640RaduModeratorHi,
That it’s a normal behavoir when you click back the browser it shows a cached page but if you click refresh after back you will see the difference.
You can redirect users to a welcome page after loggin
Cheers
RHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution -
AuthorPosts
The forum ‘General questions’ is closed to new topics and replies.