• Not sure what’s going on, my footer shows up on every other page (index, archive, search, etc) but on the pages of the individual posts it doesn’t show up. I’ve spent a couple of hours spinning my wheels looking for a closed div or something but to no avail. Anyone have any ideas?

    Here is my single.php code if that is helpful.

    <?php
    /**
     * The Template for displaying all single posts.
     *
     * @package turbosaurus
     */
    
    get_header(); ?>
    
    <script>
      $(document).ready(function(){
        // Target your .container, .wrapper, .post, etc.
        $(".container").fitVids();
      });
    </script>
    
    	<div class="magazine-head" style="background:url('<?php the_field('featured_image'); ?>') fixed;">
    
    		<div class="container">
    			<div class="row">
    				<div class="col-xs-12 col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2 col-lg-8 col-lg-offset-2">
    				<header id="myAffix" class="entry-header">
    					<div class="entry-meta">
    					<p><?php the_time('l, F jS, Y') ?> </p>
    					</div><!-- .entry-meta -->
    					<h1 class="entry-title"><?php the_title(); ?></h1>
    					<div class="tag-container">
    					<span class="category-span">
    						<?php the_category(' '); ?>
    					</span>
    					<?php the_tags( '', $sep, $after ); ?>
    				</div>
    
    				</header><!-- .entry-header -->
    				</div>
    			</div>
    		</div>
    	</div>
    
    	<div id="primary" class="content-area container">
    			<div class="row">
    			<div class="col-xs-12 col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2 col-lg-8 col-lg-offset-2 article-wrap">
    		<main id="main" class="site-main" role="main">
    
    		<?php while ( have_posts() ) : the_post(); ?>
    
    			<?php get_template_part( 'content', 'single' ); ?>
    
    			<?php turbosaurus_content_nav( 'nav-below' ); ?>
    
    			<?php
    				// If comments are open or we have at least one comment, load up the comment template
    				if ( comments_open() || '0' != get_comments_number() )
    					comments_template();
    			?>
    
    		<?php endwhile; // end of the loop. ?>
    
    		</main><!-- #main -->
    			</div>
    			</div>
    	</div><!-- #primary -->
    
    <?php get_footer(); ?>

    I

Viewing 8 replies - 1 through 8 (of 8 total)
  • Where did you download this theme from?

    Thread Starter turbosaurus

    (@turbosaurus)

    I’m building my own theme based on the underscore template. I’m also working on a local environment so I don’t have a link I can point anyone to πŸ™ . Do you see anything suspicious, should I provide more code?

    I’d start by pulling out all of javascript from your template files. That’s not really the correct way to add .js to a theme. Have a look at http://codex.wordpress.org/Function_Reference/wp_enqueue_script instead.

    Thread Starter turbosaurus

    (@turbosaurus)

    Alright, I’ll try that. I have some js in my head too

    <html <?php language_attributes(); ?>>
    <head>
    <meta charset="<?php bloginfo( 'charset' ); ?>">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title><?php wp_title( '|', true, 'right' ); ?></title>
    <link rel="profile" href="http://gmpg.org/xfn/11">
    <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
    
    <!-- STYLE SHEET IMPORTS/ I HAVE NO IDEA WHAT I'M DOING -->
    
    <style type="text/css" media="screen">
    @import url( <?php bloginfo('stylesheet_url'); ?> );
    @import url(<?php bloginfo('stylesheet_directory'); ?>/bootstrap.css);
    @import url(<?php bloginfo('stylesheet_directory'); ?>/bootstrap-theme.css);
    @import url(<?php bloginfo('stylesheet_directory'); ?>/turbo.css);
    </style>
    <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/jquery.fitvids.js"></script>
    
    <!-- END I HAVE NO IDEA WHAT I'M DOING -->
    
    <?php wp_head(); ?>
    </head>

    Are you saying I should probably throw that into the functions.php file too?

    Are you saying I should probably throw that into the functions.php file too?

    Yes – absolutely. The correct way to do this is to also enqueue them as external scripts.

    Thread Starter turbosaurus

    (@turbosaurus)

    Should I just throw all the js in there? Is the css cool to stay in the head? I’m new to all this php shenanigans and the functions.php file is kinda scary.

    Thread Starter turbosaurus

    (@turbosaurus)

    I took the easy way out and just got rid of all js in my theme and the footer still wouldn’t show up. Even if I take all the code from the footer page and paste it at the bottom of the single.php document it still doesn’t show up. Nothing shows up at the bottom of the page, I made little styled divs and couldn’t get anything.

    Try checking your site’s error logs for messages.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Footer doesn't appear on the single.php page?’ is closed to new replies.