Jump to content

Recommended Posts

Please anyone I changed something on our companies page.php wp website and I broke it. I almost have it up and running but something is still wrong. I think it is just a syntax error but I am not positive

here is the code posted below any help would be awsome!

<?php
switch (get_option(THEMEPREFIX.'_header_style', 0)) {
	case 0 : get_header(); break;
	case 1 : get_header('1'); break;
	case 2 : get_header('2'); break;
}
?>
<?php curly_get_slider(); ?>
<article <?php post_class(); ?>
	<div class="container page-content">
		<div class="row">
			<div class="col-lg-12">
				
				<!-- The Content -->
				<?php while ( have_posts() ) : the_post(); ?>
					<?php the_content() ?>			
				<?php endwhile; ?>
				

<?php if( get_option(THEMEPREFIX.'_general_sharing_box_pages') == "false" ) : ?>
				<div class="social-box">
					<p><?php echo get_option(THEMEPREFIX.'_general_sharing_box_text'); ?>
				    <span class="pull-right">
				    	<a rel="nofollow" href="http://www.facebook.com/sharer.php?u='<?php echo urlencode(get_permalink()); ?>&t=<?php echo urlencode(get_the_title()); ?>" data-toggle="tooltip" title="Facebook"><?php echo do_shortcode('[icon icon="facebook" boxed="yes"]') ?></a>
				    	<a rel="nofollow" href="http://twitthis.com/twit?url=<?php echo urlencode(get_permalink()); ?>" title="Twitter" class="tw tipsy-top"><?php echo do_shortcode('[icon icon="twitter" boxed="yes"]') ?></a>
				    	<a rel="nofollow" href="http://linkedin.com/shareArticle?mini=true&url=<?php echo urlencode(get_permalink()); ?>&title=<?php echo urlencode(get_the_title()); ?>" title="Linkedin" class="li tipsy-top"><?php echo do_shortcode('[icon icon="linkedin" boxed="yes"]') ?></a>
				    	<a rel="nofollow" href="http://google.com/bookmarks/mark?op=edit&bkmk=<?php echo urlencode(get_permalink()); ?>&title=<?php echo urlencode(get_the_title()); ?>" title="Google" class="gp tipsy-top"><?php echo do_shortcode('[icon icon="google-plus" boxed="yes"]') ?></a>
				    	<a rel="nofollow" href="mailto:?subject=<?php urlencode(get_the_title()); ?>&body=<?php echo urlencode(get_permalink()); ?>" title="Email" class="em tipsy-top"><?php echo do_shortcode('[icon icon="envelope" boxed="yes"]') ?></a>
				    </span></p></div><?php endif; ?>

<?php if (comments_open()) {
					
					if (get_option(THEMEPREFIX.'_fb_comments') != "true" ) : comments_template(); 
					else : ?>




<div id="fb-root"></div>
				<script>(function(d, s, id) {
				  var js, fjs = d.getElementsByTagName(s)[0];
				  if (d.getElementById(id)) return;
				  js = d.createElement(s); js.id = id;
				  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=233653370014075";
				  fjs.parentNode.insertBefore(js, fjs);
				}(document, 'script', 'facebook-jssdk'));</script>
				
				<h3><?php _e('Comments' , 'CURLYTHEME') ?></h3>
				<div class="fb-comments" data-href="<?php the_permalink(); ?>" data-width="470" data-num-posts="10">


 </div>  <?php endif;  } ?>
		</div>
	</div>
</article>

<?php $curly->footer(); ?>





Link to comment
https://forums.phpfreaks.com/topic/294600-syntax-error-on-wordpress-pagephp/
Share on other sites

It's difficult to tell with the formatting of the code, but I think you may be missing an endif; at the end of your code. You've got

if(comments_open()){

followed by

if (get_option(THEMEPREFIX.'_fb_comments') != "true" ) : comments_template(); 
else : ?>

but then only one 'endif;'.

 

Again, given the formatting it's difficult to tell (and I hate how much WP encourages mixing PHP and HTML and the if(): endif; syntax, but that's neither here nor there), but that could be it. I'm assuming you can't remember exactly what it was that you changed?

the endif could be misplaced. but I know it does not need another one. Basically the only problem with the website is that is shows  "
Fatal error: Call to a member function footer() on a non-object in /home2/rogue/public_html/6thmanmovers.com/wp-content/themes/equestrian/page.php on line 57" at the bottom of the page and the websites format is full screen... meaning that there is no space on any side of the page container. Other than that the website is displaying. I swear it must be a misaligned div tag or endif, it cant be off by that much.

 

 

 

Thanks again for any help

Edited by therealdjz
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.