• So I’m using Ubuntu 14.04 and my browser is Mozilla. I use Chrome as well to check my work. I’m building a theme from scratch and get_header() get_footer() would cause the page to go completely blank. After reinstalling WordPress and the MySQL database and user, get_footer still doesn’t seem to want to work. Even when I created the footer.php file.
    I striped down to just the index.php and style.css

    here is the index.php

    <?php
    
    get_header();
    
    if (have_posts()):
    	while (have_posts): the_post(); ?>
    
    <article class="post">
    	<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
    	<?php the_content(); ?>
    </article>
    
    <?php endwhile;
    
    else:
    	echo '<p>No content found</p>';
    
    endif;
    
    get_footer();
    
    ?>

    it’s my understanding that this will call a default footer from wp-includes/theme-compat/footer.php. Anyone no why it would be blank and what i can do to fix?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    from wp-includes/theme-compat/footer.php.

    You mean wp-content?

    Are you by chance confusing the file “footer.php” and the function “get_footer()” ?
    Have a look at your file “footer.php”, what function or functions does it define ?

    Thread Starter krl246

    (@krl246)

    I removed all my files from the theme except for the index.php file and the style.css file. According to what I’ve read this should give me the default footer that is stored in wp-includes/theme-compat/footer.php. Unless I’m mistaken, but get_header() is working fine since I’ve reinstalled. So why not get_footer().

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    You’ve put your theme in the wrong place, it should not be in the “wp-includes” folder. It should be in the “wp-content” folder.

    Thread Starter krl246

    (@krl246)

    it’s not in the wp-includes directory it’s in wp-content. The default footer.php file is in wp-includes directory.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Why is your theme’s footer.php file in the wp-includes directory?

    Thread Starter krl246

    (@krl246)

    i”m sorry is what I’m writing not making sense. The DEFAULT footer.php file is in wp-includes not mine. I REMOVED mine to try and troubleshoot the issue I’m having.

    Thread Starter krl246

    (@krl246)

    Is there a bug or some kind of known issue that may be causing this. It’s really bumming me out.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘WordPress scratch build: get_footer() doesn't call default footer’ is closed to new replies.