Last active
December 18, 2018 23:10
-
-
Save danielpataki/5f47292f15cbc2e2d4ff to your computer and use it in GitHub Desktop.
Modifying Twenty Fifteen
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.borderless { | |
padding:0px; | |
box-shadow:none; | |
background:transparent; | |
} | |
.borderless .entry-content { | |
padding:0px; | |
} | |
.borderless .entry-footer { | |
display:none; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.hentry { | |
background: #f4df30; | |
} | |
.entry-footer { | |
background: #303030; | |
color: #fff; | |
} | |
.entry-footer a { | |
color: #fff; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.after-post-section h3 { | |
color: #333; | |
font-size:1.3rem; | |
display:inline-block; | |
font-family: 'Noto Sans', sans-serif; | |
font-weight:700; | |
margin: 0 0 1em 0; | |
line-height: 1.2; | |
opacity:0.7; | |
text-transform: uppercase; | |
vertical-align: baseline; | |
} | |
.after-post-section h3::before { | |
content: ""; | |
display: block; | |
width: 100%; | |
min-width: 30px; | |
border-top: 1px solid #ddd; | |
margin-bottom: 1em; | |
} | |
.after-post-section .section-content { | |
font-size: 0.8em; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="after-post-section"> | |
<h3>Image Credit</h3> | |
<div class="section-content"> | |
IMAGE CREDIT HERE | |
</div> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'the_content', 'my_image_credit', 12 ); | |
function my_image_credit( $content ) { | |
if( is_singular() ) { | |
$image_credit = get_field( 'image_credit' ); | |
if( !empty( $image_credit ) ) { | |
$content .= '<div class="after-post-section"><h3>Image Credit</h3><div class="section-content">' . $image_credit . '</div></div>'; | |
} | |
} | |
return $content; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'post_class', 'borderless_post_class' ); | |
function borderless_post_class( $classes ) { | |
global $post; | |
if( get_field( 'borderless', $post->ID ) ) { | |
$classes[] = 'borderless'; | |
} | |
return $classes; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment