Created
September 10, 2016 23:56
-
-
Save InTheCloudDan/9384d0f80c75e8764c73e11f28533201 to your computer and use it in GitHub Desktop.
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('the_content','prepend_this'); | |
function prepend_this($content) | |
{ | |
$content = '<div class="container" style="background-image: url(\'' . the_post_thumbnail_url() . '\'"><div id="safe-area-back">' . $content; | |
$content = $content . "</div></div>"; | |
return $content; | |
} |
add_filter('the_content','prepend_this');
function prepend_this($content)
{
//$url = the_post_thumbnail_url();
//$content = gettype();
// Check if we're inside the main loop in a single post page.
$content = sprintf(
'<div class="postcard-container" style="background-image: url(\'%s\');"><div id="safe-area-back">%s</div></div>',
get_the_post_thumbnail(), $content);
return $content;
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
add_filter('the_content','prepend_this');
function prepend_this($content)
{
$content = sprintf(
'
get_the_post_thumbnail(), $content);
return $content;
}