WordPress Tricks

After Successful registration if you want users (except Administrator) to redirect in a page

Here is the code, which needs to put in your theme’s function.php

function wpse_19692_registration_redirect() {
	if( $role != 'administrator' ) {
    return home_url( '/directory/' );
	}
}

add_filter( 'registration_redirect', 'wpse_19692_registration_redirect' );

2 thoughts on “After Successful registration if you want users (except Administrator) to redirect in a page”

  1. hi there good day dear OM,

    i am so glad that you have helped me seveal times- you have helped me so often – i am very glad. at the moment i still sick – in the mit of the CSS _ – confusion. But i am hopeful to get through,

    first of all – many many thanks for all you did so far and insights – and for the idea- and knowledge sharing at you site allboutbasic. it is a great experience for me. Your ideas were very very inspiring. Your ideas are a great ressource of help – to get the things done at the page – http://www.job-starter.com

    see the abstract: i have created a little posting with the gathered insights into this task and posting: https://wordpress.org/support/topic/how-to-add-the-featured-image-to-a-page-with-screenshot/#post-12463850
    at the moment i still stick with the point of not being able to differentiate the tasks

    in other words every time i add a CSS that should be applied to only one post-id then i change all the image ids. Does this have to do with the way i have added the image..!?

    see the source of investigation: http://prntscr.com/r50bhr

    Note: the image was added not as image but as background. The height of this element is determined by .panel-image-prop – padding value.
    By the way: However possible is, that the image will not have valid quality when we change this in CSS. We could / should do this in php file using thumbnail image size. However if we want to do individual CSS for each post, there an advice here could be like been seen here: https://www.wpbeginner.com/wp-themes/how-to-style-each-wordpress-post-differently/

    What i have is the following: every time i add a CSS that should be applied to only one post-id then i change all the image ids.

    What is aimed: adding a rule that will apply only to post number 256 only. But this is not the case – my problem is: i cannot achieve the change of the height of only one featured image – every time i do some changes, then all the images are changing. Here we have the opposite behaviour here – described on a tutorial-site: https://www.karavadra.net/reduce-height-single-post-page-featured-images-twenty-seventeen-theme/
    well i think that i rework the whole CSS and then i will re-run the thing. Is this a good idea!?

    by the way. in the long run – i will switch to the theme 2020.
    I hope that i can switch to this theme later the spring time.

    At this moment – many many thanks for all you did. Your help was so great.

    If you have any thing to add – you can do it also here in the posting: https://wordpress.org/support/topic/how-to-add-the-featured-image-to-a-page-with-screenshot/#post-12463850
    you are a great great top-contributor in theming-things. You are so helpful here

    look forward to hear from you

    have a great day.

    best regards
    martin

    e project organized online.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s