- 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.
62 lines
1.8 KiB
PHP
62 lines
1.8 KiB
PHP
<?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( 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,
|
|
)
|
|
);
|
|
?>
|
|
</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 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 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 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>
|