therealdjz Posted February 14, 2015 Share Posted February 14, 2015 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(); ?> Quote Link to comment Share on other sites More sharing options...
maxxd Posted February 14, 2015 Share Posted February 14, 2015 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? Quote Link to comment Share on other sites More sharing options...
therealdjz Posted February 14, 2015 Author Share Posted February 14, 2015 (edited) 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 February 14, 2015 by therealdjz Quote Link to comment Share on other sites More sharing options...
Csharp Posted February 14, 2015 Share Posted February 14, 2015 Well, this makes the problem pretty straightforward. Either the $curly object is not defined or it has no function called footer. What class is curly? Even though it's not recommended practice, could you try to var_dump $curly? Quote Link to comment Share on other sites More sharing options...
maxxd Posted February 16, 2015 Share Posted February 16, 2015 Yeah, I don't see where $curly is defined before you're trying to print the footer. What theme are you using - I assume the curly() method overwrites WordPress's native get_footer() method. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.