Rss does not return Thumb in wordpress

Asked

Viewed 37 times

0

Guys, I’m trying to list posts from another site via RSS. Everything appears except the images Thumbs..

My result and code is this: inserir a descrição da imagem aqui

NOTE: I have access to the server of the files where I want to pull the posts, if anyone knows an alternative to this, please let me know... CODE BELOW:

<?php

    if (isset($_GET["xml-feed"])) {
        $strXml   = file_get_contents("http://www.euvosescrevi.com.br/feed/");
        $xml      = simplexml_load_string($strXml, "SimpleXMLElement", LIBXML_NOCDATA);
        $json     = json_encode($xml);
        $array    = json_decode($json, true);
        $arrItens = (array) isset($array["channel"]["item"]) ? $array["channel"]["item"] : "";  
        if (count($arrItens) > 0) {
    ?>

    <hr>
    <div class="blog-posts row margin-bottom-60">
        <?php
        $countItens = 0;
        foreach ($arrItens as $arr) {
            if ($countItens >= 2) break;
            $title = $arr["title"];
            $link = $arr["link"];
            $pubDate = date("d/m/Y", strtotime($arr["pubDate"]));
            $description = word_count(strip_tags($arr["description"]), 50);
            $countItens++;
        ?>

        <div class="col-md-6 col-sm-6">
            <h2><?php echo $title; ?></h2>
            <ul class="blog-info">
                <li><i class="fa fa-calendar"></i> <?php echo $pubDate; ?></li>
            </ul>
            <p><?php echo $description; ?></p>
            <p><a class="more" href="<?php echo $link; ?>" target="_blank">Leia mais <i class="fa fa-angle-right"></i></a></p>
        </div>
    </div>
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.