Rewrite footer.php for 2.0.0
- Guard the slideshow shortcode with shortcode_exists(). - Close </main> before the footer and add wp_footer(). - Keep the pagination block exactly where it is and as it is. - Keep the search form, but escape the search query and use the super-simple-wp-theme text domain. - Make the organisation number filterable via sswt_org_number. - Use sswt_logout_link() instead of the old helper name.
This commit is contained in:
1 parent
1469cd7f02
commit
01029a9777
1 file changed
+45
-16
+45
-16
@@ -1,32 +1,61 @@
|
||||
<?php echo do_shortcode('[super_simple_slideshow]'); ?>
|
||||
<?php
|
||||
/**
|
||||
* Site footer.
|
||||
*
|
||||
* @package Super_Simple_WP_Theme
|
||||
*/
|
||||
|
||||
$sswt_site_icon = get_site_icon_url();
|
||||
|
||||
// The slideshow plugin prints the raw shortcode when it is deactivated.
|
||||
if ( shortcode_exists( 'super_simple_slideshow' ) ) {
|
||||
echo do_shortcode( '[super_simple_slideshow]' );
|
||||
}
|
||||
?>
|
||||
<div class="pagination">
|
||||
<div class="prev"><?php previous_posts_link(__("← Forrige", "textdomain")); ?></div>
|
||||
<div class="prev"><?php previous_posts_link( esc_html__( '← Forrige', 'super-simple-wp-theme' ) ); ?></div>
|
||||
<div class="page-numbers">
|
||||
<?php
|
||||
the_posts_pagination(array(
|
||||
"mid_size" => 2,
|
||||
"prev_text" => false,
|
||||
"next_text" => false,
|
||||
));
|
||||
the_posts_pagination(
|
||||
array(
|
||||
'mid_size' => 2,
|
||||
'prev_text' => false,
|
||||
'next_text' => false,
|
||||
)
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
<div class="next"><?php next_posts_link(__("Neste →", "textdomain")); ?></div>
|
||||
<div class="next"><?php next_posts_link( esc_html__( 'Neste →', 'super-simple-wp-theme' ) ); ?></div>
|
||||
</div>
|
||||
<div class="search-container">
|
||||
<form role="search" method="get" class="search-form" action="<?php echo home_url("/"); ?>">
|
||||
<input type="search" class="search-field" placeholder="<?php echo esc_attr_x("Search …", "placeholder", "your-theme-textdomain"); ?>" value="<?php echo get_search_query(); ?>" name="s" />
|
||||
<button type="submit" class="search-submit"><?php echo esc_html_x("Search", "submit button", "your-theme-textdomain"); ?></button>
|
||||
<form role="search" method="get" class="search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>">
|
||||
<input type="search" class="search-field" placeholder="<?php echo esc_attr_x( 'Søk …', 'placeholder', 'super-simple-wp-theme' ); ?>" value="<?php echo esc_attr( get_search_query() ); ?>" name="s">
|
||||
<button type="submit" class="search-submit"><?php echo esc_html_x( 'Søk', 'submit button', 'super-simple-wp-theme' ); ?></button>
|
||||
</form>
|
||||
</div>
|
||||
</main>
|
||||
<footer>
|
||||
<div class="logo footer-logo">
|
||||
<a href="<?php echo home_url(); ?>">
|
||||
<img src="<?php echo get_site_icon_url(); ?>" />
|
||||
<span><?php bloginfo("name"); ?></span>
|
||||
<a href="<?php echo esc_url( home_url( '/' ) ); ?>">
|
||||
<?php if ( $sswt_site_icon ) : ?>
|
||||
<img src="<?php echo esc_url( $sswt_site_icon ); ?>" alt="">
|
||||
<?php endif; ?>
|
||||
<span><?php bloginfo( 'name' ); ?></span>
|
||||
</a>
|
||||
</div>
|
||||
<div id="logout"><?php add_logout_button(); ?></div>
|
||||
<div id="org-nr"><p>Org nr. 995 268 698</p></div>
|
||||
<div id="logout"><?php sswt_logout_link(); ?></div>
|
||||
<div id="org-nr">
|
||||
<p>
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: organisation number. */
|
||||
esc_html__( 'Org nr. %s', 'super-simple-wp-theme' ),
|
||||
esc_html( apply_filters( 'sswt_org_number', '995 268 698' ) )
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
<?php wp_footer(); ?>
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user