Jump to content
Stef's Coding Community

Php Sidebar Error


Recommended Posts

Hello, not sure if this post should be here or WordPress. I migrated a WordPress site (an ordeal in itself) to a new server and new domain name. The theme has a sidebar with a login that is throwing this error:

 

Fatal error: Call to undefined function sidebarlogin() in /home/domain_name/www/www/wp-content/themes/theme_name/sidebar-df.php on line 17

 

Can someone point me in the right direction? Here is the sidebar-df.php code below. Any help would be appreciated!

 

<div class="m-blog-side">

<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar("Home-Sidebar-Widgets") ) : ?>

<div class="side-cats2">
	<div class="sider-22">
		<?php /*
		<div class="woodo">
			<div class="ad_callout" onclick="location.href='/blog/register/';">
				<!--<h2>Call To Action!</h2>-->
				<p>Subscribe to the blog for insider information!</p>
			</div><!-- #ad_callout -->
		</div>
		*/ ?>

		<div class="woodo">
			<?php sidebarlogin(); ?>
		</div>
	</div>
</div>
<?php endif; ?>	

</div></div> 

</div> </div>

Link to post
Share on other sites

sidebarlogin() isn't a standard Wordpress function, nor is it a function built into PHP, which means that it has to be something that is custom written. Usually, custom PHP functions written for a Wordpress theme would go in the theme's "functions.php" file. Are you sure that file was copied over correctly? Otherwise, maybe the function was something from a Wordpress plugin that hasn't been reinstalled? Something to do with "woodo", the class the sidebar login is supposed to show up in?

 

It's really hard to tell -- those are just some guesses.

Link to post
Share on other sites

Thanks Ben,

 

Is there a way I can disable that thing all together? I think it was from a plugin. I am not sure. It is happening in the sidebar. Can you tell me how to disable the sidebar in the functions.php page?

Edited by debmc99
Link to post
Share on other sites

Thanks Ben, I think I am almost there. But now I get this error. Do you see the problem?

 

Parse error: syntax error, unexpected '<' in /home/xxxxx/www/www/wp-content/themes/theme-name/sidebar-df.php on line 8

 

<div class="m-blog-side">

<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar("Home-Sidebar-Widgets") ) : ?>

<div class="side-cats2">
	<div class="sider-22">
		<?php 
		<div class="woodo">
			<div class="ad_callout" onclick="location.href='/blog/register/';">
				<!--<h2>Call To Action!</h2>-->
				<p>Subscribe to the blog for insider information!</p>
			</div><!-- #ad_callout -->
		</div>
		 ?>

		<div class="woodo">
			<?php /* sidebarlogin(); */ ?> 
		</div>
	</div>
</div>
<?php endif; ?>	



</div></div> 

Edited by debmc99
Link to post
Share on other sites

Why did you take out the PHP comments from this section?

 

<?php 
                       <div class="woodo">
                               <div class="ad_callout" onclick="location.href='/blog/register/';">
                                       <!--<h2>Call To Action!</h2>-->
                                       <p>Subscribe to the blog for insider information!</p>
                               </div><!-- #ad_callout -->
                       </div>
                        ?>

needs to be:

 

<?php /*
                       <div class="woodo">
                               <div class="ad_callout" onclick="location.href='/blog/register/';">
                                       <!--<h2>Call To Action!</h2>-->
                                       <p>Subscribe to the blog for insider information!</p>
                               </div><!-- #ad_callout -->
                       </div>
                       */ ?>

or you need to remove that section entirely.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

Loading...
×
×
  • Create New...