Skip to content

Commit

Permalink
inline styles
Browse files Browse the repository at this point in the history
  • Loading branch information
hasinhayder committed May 24, 2018
1 parent b23cbf1 commit 49829e7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
15 changes: 15 additions & 0 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,21 @@ function alpha_menu_item_class( $classes, $item ) {
add_filter( "nav_menu_css_class", "alpha_menu_item_class", 10, 2 );


function alpha_about_page_template_banner(){
if(is_page()) {
$alpha_feat_image = get_the_post_thumbnail_url(null,"large");
?>
<style>
.page-header{
background-image: url(<?php echo $alpha_feat_image;?>);
}
</style>
<?
}
}
add_action("wp_head","alpha_about_page_template_banner",11);





Expand Down
5 changes: 1 addition & 4 deletions template-parts/about-page/hero-page.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
<?php
$alpha_feat_image = get_the_post_thumbnail_url(null,"large");
?>
<div class="header page-header" style="background-image: url(<?php echo $alpha_feat_image;?>);">
<div class="header page-header" >
<div class="container">
<div class="row">
<div class="col-md-12">
Expand Down

0 comments on commit 49829e7

Please sign in to comment.