Archived topic
Footer Error
3 replies · Started by Frank Savastano on January 31, 2017
I have an error showing on my webpage: footer. * * Contains the closing of the id=main div and all content after * * @package GeneratePress */ ?>
and /** * The template for displaying the footer. * * Contains the closing of the id=main div and all content after * * @package GeneratePress */ ?>
My site was attacked with some malware and i believe code was embedded in the footer. Below is a copy of footer.php any help is appreciated:
/**
* The template for displaying the footer.
*
* Contains the closing of the id=main div and all content after
*
* @package GeneratePress
*/
?>
</div><!-- #content -->
</div><!-- #page -->
<?php do_action('generate_before_footer'); ?>
<div>>
<?php
do_action('generate_before_footer_content');
// Get how many widgets to show
$widgets = generate_get_footer_widgets();
if ( !empty( $widgets ) && 0 !== $widgets ) :
// Set up the widget width
$widget_width = '';
if ( $widgets == 1 ) $widget_width = '100';
if ( $widgets == 2 ) $widget_width = '50';
if ( $widgets == 3 ) $widget_width = '33';
if ( $widgets == 4 ) $widget_width = '25';
if ( $widgets == 5 ) $widget_width = '20';
?>
<div class="site footer-widgets">
<div class="inside-footer-widgets grid-container grid-parent">
<?php if ( $widgets >= 1 ) : ?>
<div> tablet-grid-<?php echo apply_filters( 'generate_footer_widget_1_tablet_width', '50' ); ?>">
<?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('footer-1')): ?>
<aside class="widget inner-padding widget_text">
<h4 class="widget-title"><?php _e('Footer Widget 1','generate');?></h4>
<div class="textwidget">
<p><?php printf( __( 'Replace this widget content by going to <a href="%1$s"><strong>Appearance / Widgets</strong></a> and dragging widgets into Footer Area 1.','generate' ), admin_url( 'widgets.php' ) ); ?></p>
<p><?php printf( __( 'To remove or choose the number of footer widgets, go to <a href="%1$s"><strong>Appearance / Customize / Layout / Footer Widgets</strong></a>.','generate' ), admin_url( 'customize.php' ) ); ?></p>
</div>
</aside>
<?php endif; ?>
</div>
<?php endif;
if ( $widgets >= 2 ) : ?>
<div> tablet-grid-<?php echo apply_filters( 'generate_footer_widget_2_tablet_width', '50' ); ?>">
<?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('footer-2')): ?>
<aside class="widget inner-padding widget_text">
<h4 class="widget-title"><?php _e('Footer Widget 2','generate');?></h4>
<div class="textwidget">
<p><?php printf( __( 'Replace this widget content by going to <a href="%1$s"><strong>Appearance / Widgets</strong></a> and dragging widgets into Footer Area 2.','generate' ), admin_url( 'widgets.php' ) ); ?></p>
<p><?php printf( __( 'To remove or choose the number of footer widgets, go to <a href="%1$s"><strong>Appearance / Customize / Layout / Footer Widgets</strong></a>.','generate' ), admin_url( 'customize.php' ) ); ?></p>
</div>
</aside>
<?php endif; ?>
</div>
<?php endif;
if ( $widgets >= 3 ) : ?>
<div> tablet-grid-<?php echo apply_filters( 'generate_footer_widget_3_tablet_width', '50' ); ?>">
<?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('footer-3')): ?>
<aside class="widget inner-padding widget_text">
<h4 class="widget-title"><?php _e('Footer Widget 3','generate');?></h4>
<div class="textwidget">
<p><?php printf( __( 'Replace this widget content by going to <a href="%1$s"><strong>Appearance / Widgets</strong></a> and dragging widgets into Footer Area 3.','generate' ), admin_url( 'widgets.php' ) ); ?></p>
<p><?php printf( __( 'To remove or choose the number of footer widgets, go to <a href="%1$s"><strong>Appearance / Customize / Layout / Footer Widgets</strong></a>.','generate' ), admin_url( 'customize.php' ) ); ?></p>
</div>
</aside>
<?php endif; ?>
</div>
<?php endif;
if ( $widgets >= 4 ) : ?>
<div> tablet-grid-<?php echo apply_filters( 'generate_footer_widget_4_tablet_width', '50' ); ?>">
<?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('footer-4')): ?>
<aside class="widget inner-padding widget_text">
<h4 class="widget-title"><?php _e('Footer Widget 4','generate');?></h4>
<div class="textwidget">
<p><?php printf( __( 'Replace this widget content by going to <a href="%1$s"><strong>Appearance / Widgets</strong></a> and dragging widgets into Footer Area 4.','generate' ), admin_url( 'widgets.php' ) ); ?></p>
<p><?php printf( __( 'To remove or choose the number of footer widgets, go to <a href="%1$s"><strong>Appearance / Customize / Layout / Footer Widgets</strong></a>.','generate' ), admin_url( 'customize.php' ) ); ?></p>
</div>
</aside>
<?php endif; ?>
</div>
<?php endif;
if ( $widgets >= 5 ) : ?>
<div> tablet-grid-<?php echo apply_filters( 'generate_footer_widget_5_tablet_width', '50' ); ?>">
<?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('footer-5')): ?>
<aside class="widget inner-padding widget_text">
<h4 class="widget-title"><?php _e('Footer Widget 5','generate');?></h4>
<div class="textwidget">
<p><?php printf( __( 'Replace this widget content by going to <a href="%1$s"><strong>Appearance / Widgets</strong></a> and dragging widgets into Footer Area 5.','generate' ), admin_url( 'widgets.php' ) ); ?></p>
<p><?php printf( __( 'To remove or choose the number of footer widgets, go to <a href="%1$s"><strong>Appearance / Customize / Layout / Footer Widgets</strong></a>.','generate' ), admin_url( 'customize.php' ) ); ?></p>
</div>
</aside>
<?php endif; ?>
</div>
<?php endif; ?>
</div>
</div>
<?php
endif;
do_action('generate_after_footer_widgets');
?>
<footer class="site-info" itemtype="http://schema.org/WPFooter" itemscope="itemscope" role="contentinfo">
<div class="inside-site-info grid-container grid-parent">
<?php do_action( 'generate_credits' ); ?>
</div>
</footer><!-- .site-info -->
<?php do_action( 'generate_after_footer_content' ); ?>
</div><!-- .site-footer -->
<?php wp_footer(); ?>
</body>
</html>
Hi Frank,
Have you tried reinstalling GP and GP premium?
I actually just did an update and that did the trick!
Thanks
Awesome! :)