Jump to content

Recommended Posts

Posted

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>

Posted

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.

Posted (edited)

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
Posted (edited)

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
Posted

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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...