[Theme: Storefront] Using custom php to add image to homepage only
-
I am attempting to get a full-width image to show up only on the homepage of Storefront theme, and used the following code in template-homepage.php (in a child theme), however it doesn’t seem to have worked. The function itself, without the if statement, works when in function.php, but for all pages:
function storefront_add_bottombar() {
?>
<div id=”strip”>
<div class=”col-full”></div>
</div>
<?php
}
add_action( ‘storefront_before_content’, ‘storefront_add_bottombar’ );Where should this be placed in order to work only on the homepage?
Thanks
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘[Theme: Storefront] Using custom php to add image to homepage only’ is closed to new replies.