Tagged: client login, login, private content
-
AuthorPosts
-
February 16, 2016 at 9:36 am #583993
Hey everyone
I’m looking for a plugin that provides me with a frontend login for our clients. When they log in they can see pages that the public can’t see. I’ve found several plugins for login only that just redirects to a page or plugins where you can hide certain pages, but I need a plugin that offers both, the login for clients which leads to private pages.
For example on my website, the pages “Datenraum” and “Bieterraum” should only be seen by clients that are logged in. As of right now, it’s public.Can someone recommend me such a plugin?
Thanks in advance.
AlineFebruary 16, 2016 at 10:33 am #584026to show a different menu for logged-in logged-out users there is a php way via child-theme functions.php
you make two menus (the one for non logged in users and the other one) i called them main menu (for logged out users) and main menu logged (for logged in users). The one for logged out users i checked for main navigation
function my_wp_nav_menu_args( $args = '' ) { if( is_user_logged_in() ) { $args['menu'] = 'main menu logged'; } else { $args['menu'] = 'main menu'; } return $args; } add_filter( 'wp_nav_menu_args', 'my_wp_nav_menu_args' );
but this only hides the pages links in your menu – if you want a restriction there are a lot of plugins – but i did not find one easy to use
Eyes only or page restrict etc. role scoper .
But i don’t like to test it now.February 16, 2016 at 10:54 am #584044:lol: this seems to do it (even hide the menu list point by setting up only one mark in that (page/post)
Take this solution and forget the one before!
https://de.wordpress.org/plugins/secret-content/
but ( it only works for post and pages – i will try to extend it to custom post (like portfolio posts) )
- This reply was modified 8 years, 10 months ago by Guenni007.
February 16, 2016 at 11:26 am #584071hm it seems to be to easy ! ?
goto plugin editor and open – choose secret content and only ad that meta box for portfolio:
add_meta_box( 'secret_sectionid', _x( 'Show this to logged in visitors only?', 'Headline for checkbox / activation on portfolio', 'secret_textdomain' ), 'secret_render_meta_box_content', 'portfolio', 'side', 'high' );
so it looks afterwards at the top in this way:
function secret_meta_box() { add_meta_box( 'secret_sectionid', _x( 'Show this to logged in visitors only?', 'Headline for checkbox / activation on posts', 'secret_textdomain' ), 'secret_render_meta_box_content', 'post', 'side', 'high' ); add_meta_box( 'secret_sectionid', _x( 'Show this to logged in visitors only?', 'Headline for checkbox / activation on portfolio', 'secret_textdomain' ), 'secret_render_meta_box_content', 'portfolio', 'side', 'high' ); add_meta_box( 'secret_sectionid', _x( 'Show this to logged in visitors only?', 'Headline for checkbox / activation on pages', 'secret_textdomain' ), 'secret_render_meta_box_content', 'page', 'side', 'high' ); }
then the plugin works too for portfolio entries !
- This reply was modified 8 years, 10 months ago by Guenni007.
February 16, 2016 at 11:37 am #584077for the login. you can use a plugin like: https://wordpress.org/plugins/sidebar-login/
And for the members you can choose only subscribers – that is enough.February 17, 2016 at 7:08 am #584498Hi @realit-treuhand,
Did you try @Guenni007’s suggestions and did you have any luck with them?
Regards,
RikardFebruary 17, 2016 at 10:20 am #584547Hey thanks for the many answers. I am now using the password protected page option.
How can I edit/change the text with its font family and size?
Is it possible to still have the navigation bar shown and even a header photo? Also the socket should be the same size as on all the other pages.Regards,
AlineFebruary 17, 2016 at 6:25 pm #584881the password protected page option ?
<smh>
i try to find a solution which fits perferct for you.
there was only one marker to set on each page/post/portfolio – if the marker is set only logged-in users see those posts including those related menu entries. Even in masonry and sidestep blog navigation only logged in users can see those marked entries.February 19, 2016 at 6:42 pm #586235Hi!
@guenni007 Thanks for your help! :)Please add following code to Functions.php file in Appearance > Editor
function custom_password_form() { global $post; $label = 'pwbox-'.( empty( $post->ID ) ? rand() : $post->ID ); $o = '<form action="' . esc_url( site_url( 'wp-login.php?action=postpass', 'login_post' ) ) . '" class="post-password-form" method="post">' . __( "You can write your own text here" ) . ' <label for="' . $label . '">' . __( "Password:" ) . ' </label><input name="post_password" id="' . $label . '" type="password" size="20" /><input type="submit" name="Submit" value="' . esc_attr__( "Submit" ) . '" /> </form> '; return $o; } add_filter( 'the_password_form', 'custom_password_form' );
Cheers!
YigitMarch 1, 2016 at 9:26 am #591423Hey Yigit
I’ve already done that and was able to change the text but I wouldn’t know where to insert the the font-family and size. More important though: How can I make the socket smaller, like on all the other pages? I’d also like to show the fullwidth header photo with its navigation bar and in the main content the password form should show up.
Is this possible?
Thanks for the help.
AlineMarch 7, 2016 at 2:06 pm #594305Hey!
Sorry for the late reply!
Please add following code to Quick CSS in Enfold theme options under General Styling tabform.post-password-form p { font-size: 20px; font-family: arial; } #socket .container { padding-top: 0; padding-bottom: 0; }
Please post a screenshot and show the changes you would like to make regarding “fullwidth header photo”. You can upload your screenshots on imgur.com or Dropbox public folder and post the links here.
Cheers!
YigitApril 14, 2016 at 11:00 am #613682I’ve done that but whether the size nor its font family changed, I’ve even tried adding !important.
This is what it looks like now:I need the text at least the same size as “Passwort” and the socket shouldn’t be that big, actually it should just be at the bottom like on all my other pages. Also a little space between the text and “Passwort” would be good. Can I also change the background color of the button? as well as size and font family of its text.
Thanks.
April 18, 2016 at 6:02 am #616040 -
AuthorPosts
- You must be logged in to reply to this topic.