1
votes

I'm very confused here. I am very familiar with Wordpress, however, I cannot get the home page of my site to display the HTML and PHP etc that is currently in my home page template.

I have gone to settings - reading and set the home page to a static home page under 'Home', which as you can imagine has the page template for the HTML/PHP I want to display.

I was wondering if anyone knew of any other external factors that affect the home page and the templates being brought through on my other pages are actually working - it's very odd.

I have checked the DOM on the browser multiple times, using Chrome, however none of the divs etc are showing.

Here is the code for the front page so far:

<?php
/* Template Name: Home Page Template */
?>
<?php get_header(); ?> 


<div class="header_banner">

    <div class="image_content">
        <div class="image">
            <video playsinline="" autoplay="" muted="" loop="" poster="" onplaying="this.controls=false">
                <source src="<?php echo get_stylesheet_directory_uri(); ?>/videos/video_background.mp4">
                Your browser does not support the video element.
            </video>
        </div>
    </div>

     <div class="main_content center center_absolute">
        <h1>I create and design websites.</h1>
        <h2>I specialise in HTML, CSS, jQuery and Wordpress.</h2>
     </div>

     <div class="center_scroll">
         <div class="scroll">
            <i class="fa fa-chevron-down" aria-hidden="true"></i>
         </div>
     </div>

</div>


<?php get_footer();
2

2 Answers

0
votes

One possibility is that the page you selected in the dropdown menu under Settings > reading does not have "Home Page Template" template selected under "Page Attributes" Meta Box.

0
votes

You could rename the file to page-home.php since this template will only be used once on your site. Maybe this helps.