So 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” haha.

Any ideas?

Thanks!

Read more here: WordPress issue with get_title – displaying title of carousel slide?


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: