• Resolved pad

    (@pad)


    Hi,

    I’ve made a new template for pages that I don’t wish to have a sidebar on.

    It works and everything but I get the following error:

    Line: 23
    Char: 3

    ‘null’ is null or not an object.

    The code is as follows:

    <?php
    /*
    Template Name: Sidebarless
    */
    ?>
    
    <?php get_header(); ?>
    
    <div class="content">
    	<div id="viewingfigsnomos">
    		<div id="current-content">
    			<div id="primarycontent" class="hfeed">
    
    				<?php while (have_posts()) { the_post(); ?>
    				<div id="post-<?php the_ID(); ?>" class="<?php k2_post_class(); ?>">
    
    					<div class="page-head">
    						<h2><a href="<?php the_permalink() ?>" rel="bookmark" title='<?php printf( __('Permanent Link to "%s"','k2_domain'), wp_specialchars(strip_tags(the_title('', '', false)),1) ); ?>'><?php the_title(); ?></a></h2>
    						<?php edit_post_link(__('Edit','k2_domain'), '<span class="entry-edit">','</span>'); ?>
    					</div>
    
    					<div class="entry-content">
    						<?php the_content(); ?>
    
    						<?php link_pages('<p><strong>'.__('Pages:','k2_domain').'</strong> ', '</p>', 'number'); ?>
    					</div>
    
    				</div> <!-- #post-ID -->
    				<?php } // End the Loop ?>
    
    			</div> <!-- #primarycontent .hfeed -->
    		</div> <!-- #current-content -->
    
    		<div id="dynamic-content"></div>
    	</div> <!-- #primary -->
    	</div> <!-- .content -->
    
    <?php get_footer(); ?>

    Any ideas how I can remove this curséd error?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter pad

    (@pad)

    I would really appreciate some help

    Thread Starter pad

    (@pad)

    Anyone? 🙁

    whooami

    (@whooami)

    thats a javascript error, fwiw.

    your loading javascript in your header and youve possibly removed the function, down below.

    That would be my guess. Since you didnt provide a link to the site, you cant really expect much more of an answer.

    Thread Starter pad

    (@pad)

    Thanks for the reply whooami.

    I am loading javascript, you’re right, so do you think that it’s somehow in the sidebar? Or something? And if the sidebar isn’t called in the template the error is produced?

    Thread Starter pad

    (@pad)

    Aha! Got it – you were right whooami.

    There was javascript in there. Thanks SO much!

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

The topic ‘Error in template – ‘null’ or not an object?’ is closed to new replies.