File: /www/wwwroot/biographybirthday.com/wp-content/themes/bio/single.php
<?php
/**
* The template for displaying all single posts
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
*
* @package WordPress
* @subpackage Twenty_Nineteen
* @since 1.0.0
*/
get_header();
?>
<?php
$year_week = date("YW");
$post_id = get_the_ID();
$views = blog_get_views();
$position = blog_get_most_popular_position($views);
$dob = metaField( 'bio_dob');
$horoscope = metaField('bio_horoscope');
?>
<div class="page-wrapper">
<?php include('parts/single/top_info.php');?>
<div class="container">
<div class="row">
<?php include('parts/single/popularity_facts.php');?>
<div class="bio col-sm-7 col-md-8 col-lg-9 entry-content">
<?php the_content();?>
<div class="popularity mobile-popularity-facts"></div>
<div class="popularity mobile-bio-facts"></div>
<?php include('parts/single/related_post.php');?>
<?php include('parts/single/also_viewed_post.php');?>
<?php include('parts/single/more_birthday_horoscope.php');?>
</div>
</div>
</div>
</div>
<style>
</style>
<script>
var boosted = false;
jQuery(document).ready( function() {
if(window.innerWidth < 640){
jQuery('.mobile-popularity-facts').html(jQuery('.popularity-facts').html());
jQuery('.mobile-bio-facts').html(jQuery('.popularity-bio-facts').html());
}
jQuery("#btn-boost").click( function(e) {
e.preventDefault();
if(!boosted){
post_id = jQuery(this).data("id");
jQuery(this).css('background-color','#ccc');
jQuery.ajax({
type : "post",
dataType : "json",
url : ajaxURL,
data : {action: "bio_boost", post_id : post_id},
success: function(response) {
boosted = true;
}
});
}
});
var allVideos = jQuery("iframe[data-src^='https://www.youtube']");
var fluidEl = jQuery(".post-single-content-body");
var newWidth = fluidEl.width();
allVideos.each(function() {
aspect_ratio = this.height / this.width;
jQuery(this).width(newWidth).height(newWidth * aspect_ratio);
});
jQuery('.sidebar-stick').theiaStickySidebar({
// Settings
additionalMarginTop: 30,
minWidth: 500
});
});
</script>
<style>
.bio h2{
color: #000;
}
.bio h3 {
font-style: normal;
font-weight: 900;
font-size: 20px;
line-height: 1.8em;
}
.entry-content{
font-size: 18px;
line-height: 1.8em;
}
.entry-content p {
text-align: left;
}
.entry-content h2{
}
.entry-content h3{
border-bottom:none;
}
.famous-slider img{height: auto;}
.famous-slider{height: auto;}
@media screen and (min-width: 1024px){
.bio-posted{float:right;}
.famous-slider img{width:300px;height: auto;}
.famous-slider{
margin-top:20px;
}
.main-info {
padding-top: 0px;
}
.stats {
padding: 0px 0px 0;
}
}
@media screen and (max-width: 782px){
.bio-posted{text-align:center;}
}
</style>
<?php
get_footer();