function addMetaForSEO()
{
}
function addSchema($post)
{
global $post;
$seriesTax = "series";
if (wp_get_attachment_url(get_post_thumbnail_id($post->ID))) {
$thumb = get_the_post_thumbnail_url($post->ID, "TopSlider ");
} else {
$thumb = get_option("DefultBlock")["url"];
}
$Schema = "movie";
foreach (is_array(get_the_terms($post->ID, $seriesTax, "")) ? get_the_terms($post->ID, $seriesTax, "") : array() as $series) {
$Schema = "serie";
if (0 < $series->parent) {
$HasSeasons = true;
$SerieID = $series->parent;
$CurrentSeason = $series->term_id;
} else {
$CurrentSeries = $series->term_id;
}
}
foreach (is_array(get_the_terms($post->ID, "tvshow", "")) ? get_the_terms($post->ID, "tvshow", "") : array() as $tvshow) {
$Schema = "tvshow";
if (0 < $tvshow->parent) {
$HasSeasons = true;
$tvshowID = $tvshow->parent;
$CurrentSeTv = $tvshow->term_id;
} else {
if (isset($serie->parent) && $serie->parent == 0) {
$CurrentTvShow = $tvshow->term_id;
} else {
$CurrentTvShow = $tvshow->term_id;
}
}
}
if ($Schema == "movie") {
echo "
";
echo "
" . get_the_title($post->ID) . "
";
echo "

ID)) . "\" itemprop=\"image\" />";
echo "
" . wp_trim_words(get_the_content(), 20, "...") . "";
echo "Director:";
foreach (is_array(get_the_terms($post->ID, "director", "")) ? get_the_terms($post->ID, "director", "") : array() as $director) {
echo "
";
echo "" . $director->name . "";
echo "
";
}
echo "Writers:";
foreach (is_array(get_the_terms($post->ID, "escritor", "")) ? get_the_terms($post->ID, "escritor", "") : array() as $writers) {
echo "
";
echo "" . $writers->name . "";
echo "
";
}
echo "Stars:";
foreach (is_array(get_the_terms($post->ID, "actor", "")) ? get_the_terms($post->ID, "actor", "") : array() as $actor) {
echo "
";
echo "" . $actor->name . ",";
echo "
";
}
echo "
8/10 stars from200 users.Reviews: 50.
";
echo "
post_date)) . "\" class=\"runtime\">";
echo date("d-m-Y", strtotime($post->post_date));
echo " ";
} else {
if ($Schema == "tvshow") {
if (get_the_terms($post->ID, "tvshow", "")) {
foreach (get_the_terms($post->ID, "tvshow", "") as $serie) {
if ($serie->parent == 0) {
echo "