My page.php page looks like this:
<?php /* Template Name: CustomPageT1 */ ?>
<?php get_header() ?>
<div class="content">
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<?php
// TO SHOW THE PAGE CONTENTS
while ( have_posts() ) : the_post(); ?> <!--Because the_content() works only inside a WP Loop -->
<div class="entry-content-page">
<?php the_content(); ?> <!-- Page Content -->
</div><!-- .entry-content-page -->
<?php
endwhile; //resetting the page loop
wp_reset_query(); //resetting the page query
?>
</div>
<?php get_footer() ?>
What's actually happening though, is that rather than displaying the title of the page (i.e "About Us" it's actually displaying the title of the first slide from the carousel on the page (i.e "Slide One")
http://www.scottdaviesdesign.co.uk/donationboxes is the URL if it's easier for you all.
I've tried a few other ways of displaying the title, ie, by ID etc but none are working, they all just come up with "Slide One".
Any ideas?
Here's the header code as well. I'm using "Super Hero Slider" for the carousel:
<!doctype html>
<html <?php language_attributes(); ?> class="no-js">
<head>
<meta charset="<?php bloginfo('charset'); ?>">
<title><?php wp_title(''); ?><?php if(wp_title('', false)) { echo ' :'; } ?> <?php bloginfo('name'); ?></title>
<link href="https://fonts.googleapis.com/css?family=Hind|Montserrat|Ek+Mukta:400,700" rel="stylesheet">
<link href="//www.google-analytics.com" rel="dns-prefetch">
<link href="<?php echo get_template_directory_uri(); ?>/img/icons/favicon.ico" rel="shortcut icon">
<link href="<?php echo get_template_directory_uri(); ?>/img/icons/touch.png" rel="apple-touch-icon-precomposed">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="<?php bloginfo('description'); ?>">
<?php wp_head(); ?>
<script>
// conditionizr.com
// configure environment tests
conditionizr.config({
assets: '<?php echo get_template_directory_uri(); ?>',
tests: {}
});
</script>
</head>
<body <?php body_class(); ?>>
<div id="donation-boxes-header">
<div class="alignleft"><a href="#"><img src="http://scottdaviesdesign.co.uk/donationboxes/wp-content/uploads/2017/05/donation-boxes-logo.png" alt="donation boxes logo"></a></div>
<div class="alignright"><p><?php wp_nav_menu( array( 'container_class' => 'main-nav', 'theme_location' => 'primary' ) ); ?></p></div>
</div>
<div style="clear: both;"></div>
<?php echo do_shortcode('[super_hero_slider slider=25]') ?>