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!
Hey Simon,
What happens if you comment out get_header() and get_footer() ?
//get_header();
<?php //get_footer(); ?>
Regards,
Rikard
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?
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