Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #489509

    Dear all,

    I built a custom template file for password protected pages via the standard wordpress password protection.
    The idea is to have an easy option to create multiple login-pages with different images, headlines and descriptions.

    To do so, I found everything to get started and to apply the custom login page inside this forum.
    But after login to a password protected page, the header and the sidebar appear twice (please see Screenshot attached to private content)

    Now I cannot figure out how to change my template file to prevent the doubled header and sidebar.

    My idea is, it might be possible to change position of the if-else-function inside my template to be able to leave out “header and sidebar” in the else part.

    But I only have dangerous superficial knowledge in PHP, which is why I ask for help. To make it more easy I uploaded my template to pastebin.

    Cheers!

    #489874

    Hey Simon,

    What happens if you comment out get_header() and get_footer() ?

    //get_header();
    <?php //get_footer(); ?>
    

    Regards,
    Rikard

    #490041

    Dear Rikard,

    easy answer: the whole template breaks up.
    The forum tells me to use the page.php as an boilerplate for my individualized template.

    The problem has to do with the else-part of the if-else-function.
    I think the doubled parts might be caused by “<?php the_content(); ?>.

    The positioning of the if-else-function might be the problem?

    May you assist?

    #491241

    Hi!

    in this forum we can offer you basic support only and what you are asking for is out of our support scope, as written in our support policy. I recommend to use a plugin for the functions you need. Maybe this one could help you: https://wordpress.org/plugins/wp-members/ or https://membermouse.com/

    If you still need help with your own customizations then you need to hire a freelancer for this job. You could ask one here: http://kriesi.at/contact/customization

    Regards,
    Andy

    • This reply was modified 9 years, 3 months ago by Andy.
Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Custom template for password protection shows head and sidebar twice after login’ is closed to new replies.