- Joined
- Feb 17, 2023
- Messages
- 1
- Reaction score
- 0
Hi, a previous developer set up a login page that would then should a technical downloads page, however all of a sudden when you subit your details it just refreshes the login page rather than going to the downloads page. This is the code below, I am not really a developer but I found this in the theme settings and I cant get access to our hosting etc.
<?php
/*
Template Name: Tech Hub Template
*/
$pageTemplate = 'default-page';
include(locate_template('/inc/header.php')); ?>
<?php include(locate_template('/inc/in-page-banner.php')); ?>
<div id="<?php echo trim(strtolower(str_replace(" ", "-", get_the_title()))); ?>" class="row main-content">
<div class="grid two-thirds">
<?php if (isset($_COOKIE['has_verified_access']) || is_user_logged_in()) : ?>
<?php if (get_field('download_categories')) : while (has_sub_field('download_categories')) : ?>
<?php if (get_sub_field('category_name') || get_sub_field('category_logo')) : ?>
<h3 class="techhub-title">
<?php if ($categoryImage = get_sub_field('category_logo')) : ?>
<img src="<?php echo $categoryImage['sizes']['thumbnail']; ?>" alt=" ">
<?php endif; ?>
<?php if (get_sub_field('category_name')) : ?>
<?php the_sub_field('category_name'); ?>
<?php endif; ?>
</h3>
<?php endif; ?>
<?php if (get_sub_field('downloads')) : ?>
<div class="techhub-download-grid" style="border-color: <?php echo get_sub_field('download_border_colour') ? get_sub_field('download_border_colour') : '#646363'; ?>;">
<?php while (has_sub_field('downloads')) : $file = get_sub_field('file'); ?>
<a href="<?php echo $file['url']; ?>" target="_blank" class="techhub-download-item">
<?php if ($downloadIcon = get_sub_field('icon')) : ?>
<img src="<?php echo $downloadIcon['sizes']['medium']; ?>" alt=" ">
<?php endif; ?>
<span><?php the_sub_field('title'); ?></span>
</a>
<?php endwhile; ?>
</div>
<?php endif; ?>
<?php if (get_field('follow_up_text')) : ?>
<div class="techhub-follow-up">
<?php the_field('follow_up_text'); ?>
</div>
<?php endif; ?>
<?php endwhile;
endif; ?>
<?php else : ?>
<p style="display: block; background: #eee; padding: 10px; border-radius: 2px;"><i class="fal fa-info-circle"></i> By submitting the below form you consent to Access2 Ltd processing your information in accordance with our privacy policy which can be found <a target="_blank" href="http://access2.com/privacypolicy/">here</a>.<p>
<form action="/wp-content/themes/Access2Theme/inc/tech-signup.php" method="POST" class="technical-form">
<?php if (isset($_REQUEST['error'])) : ?>
<p style="color: red; font-weight: bold;">Please ensure you enter the required fields below to proceed.</p>
<?php else : ?>
<p style="font-weight: bold;">In order to get access to the Technical Hub, please provide your name and email address details below.</p>
<?php endif; ?>
<label for="name"><i class="fal fa-user"></i> Your name*</label>
<input type="text" name="name">
<label for="email"><i class="fal fa-envelope"></i> Your email address*</label>
<input type="email" name="email">
<div class="button-container">
<button class="btn btn-primary" role="submit">Get Access <i class="fal fa-lock"></i><i class="fal fa-unlock"></i></button>
</div>
</form>
<?php endif; ?>
</div>
<div class="grid one-third">
<?php include(locate_template('/inc/links-sidebar.php')); ?>
<?php include(locate_template('/inc/product-sidebar.php')); ?>
</div>
</div>
<?php include(locate_template('/inc/footer.php')); ?>
<?php
/*
Template Name: Tech Hub Template
*/
$pageTemplate = 'default-page';
include(locate_template('/inc/header.php')); ?>
<?php include(locate_template('/inc/in-page-banner.php')); ?>
<div id="<?php echo trim(strtolower(str_replace(" ", "-", get_the_title()))); ?>" class="row main-content">
<div class="grid two-thirds">
<?php if (isset($_COOKIE['has_verified_access']) || is_user_logged_in()) : ?>
<?php if (get_field('download_categories')) : while (has_sub_field('download_categories')) : ?>
<?php if (get_sub_field('category_name') || get_sub_field('category_logo')) : ?>
<h3 class="techhub-title">
<?php if ($categoryImage = get_sub_field('category_logo')) : ?>
<img src="<?php echo $categoryImage['sizes']['thumbnail']; ?>" alt=" ">
<?php endif; ?>
<?php if (get_sub_field('category_name')) : ?>
<?php the_sub_field('category_name'); ?>
<?php endif; ?>
</h3>
<?php endif; ?>
<?php if (get_sub_field('downloads')) : ?>
<div class="techhub-download-grid" style="border-color: <?php echo get_sub_field('download_border_colour') ? get_sub_field('download_border_colour') : '#646363'; ?>;">
<?php while (has_sub_field('downloads')) : $file = get_sub_field('file'); ?>
<a href="<?php echo $file['url']; ?>" target="_blank" class="techhub-download-item">
<?php if ($downloadIcon = get_sub_field('icon')) : ?>
<img src="<?php echo $downloadIcon['sizes']['medium']; ?>" alt=" ">
<?php endif; ?>
<span><?php the_sub_field('title'); ?></span>
</a>
<?php endwhile; ?>
</div>
<?php endif; ?>
<?php if (get_field('follow_up_text')) : ?>
<div class="techhub-follow-up">
<?php the_field('follow_up_text'); ?>
</div>
<?php endif; ?>
<?php endwhile;
endif; ?>
<?php else : ?>
<p style="display: block; background: #eee; padding: 10px; border-radius: 2px;"><i class="fal fa-info-circle"></i> By submitting the below form you consent to Access2 Ltd processing your information in accordance with our privacy policy which can be found <a target="_blank" href="http://access2.com/privacypolicy/">here</a>.<p>
<form action="/wp-content/themes/Access2Theme/inc/tech-signup.php" method="POST" class="technical-form">
<?php if (isset($_REQUEST['error'])) : ?>
<p style="color: red; font-weight: bold;">Please ensure you enter the required fields below to proceed.</p>
<?php else : ?>
<p style="font-weight: bold;">In order to get access to the Technical Hub, please provide your name and email address details below.</p>
<?php endif; ?>
<label for="name"><i class="fal fa-user"></i> Your name*</label>
<input type="text" name="name">
<label for="email"><i class="fal fa-envelope"></i> Your email address*</label>
<input type="email" name="email">
<div class="button-container">
<button class="btn btn-primary" role="submit">Get Access <i class="fal fa-lock"></i><i class="fal fa-unlock"></i></button>
</div>
</form>
<?php endif; ?>
</div>
<div class="grid one-third">
<?php include(locate_template('/inc/links-sidebar.php')); ?>
<?php include(locate_template('/inc/product-sidebar.php')); ?>
</div>
</div>
<?php include(locate_template('/inc/footer.php')); ?>