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
+48
-19
+48
-19
@@ -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="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">
|
<div class="page-numbers">
|
||||||
<?php
|
<?php
|
||||||
the_posts_pagination(array(
|
the_posts_pagination(
|
||||||
"mid_size" => 2,
|
array(
|
||||||
"prev_text" => false,
|
'mid_size' => 2,
|
||||||
"next_text" => false,
|
'prev_text' => false,
|
||||||
));
|
'next_text' => false,
|
||||||
|
)
|
||||||
|
);
|
||||||
?>
|
?>
|
||||||
</div>
|
</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>
|
||||||
<div class="search-container">
|
<div class="search-container">
|
||||||
<form role="search" method="get" class="search-form" action="<?php echo home_url("/"); ?>">
|
<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("Search …", "placeholder", "your-theme-textdomain"); ?>" value="<?php echo get_search_query(); ?>" name="s" />
|
<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("Search", "submit button", "your-theme-textdomain"); ?></button>
|
<button type="submit" class="search-submit"><?php echo esc_html_x( 'Søk', 'submit button', 'super-simple-wp-theme' ); ?></button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<footer>
|
</main>
|
||||||
|
<footer>
|
||||||
<div class="logo footer-logo">
|
<div class="logo footer-logo">
|
||||||
<a href="<?php echo home_url(); ?>">
|
<a href="<?php echo esc_url( home_url( '/' ) ); ?>">
|
||||||
<img src="<?php echo get_site_icon_url(); ?>" />
|
<?php if ( $sswt_site_icon ) : ?>
|
||||||
<span><?php bloginfo("name"); ?></span>
|
<img src="<?php echo esc_url( $sswt_site_icon ); ?>" alt="">
|
||||||
|
<?php endif; ?>
|
||||||
|
<span><?php bloginfo( 'name' ); ?></span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="logout"><?php add_logout_button(); ?></div>
|
<div id="logout"><?php sswt_logout_link(); ?></div>
|
||||||
<div id="org-nr"><p>Org nr. 995 268 698</p></div>
|
<div id="org-nr">
|
||||||
</footer>
|
<p>
|
||||||
</body>
|
<?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>
|
</html>
|
||||||
Reference in new issue
Block a user