the answer for all question about Oxygen Builder plugin and WordPress

Hi, I had managed to show a rss feed (pulled from a url) using php code in a cod

Hi, I had managed to show a rss feed (pulled from a url) using php code in a code block. It has stopped working lately, I have no idea why (I am not php-savvy). Can anyone help me with a php code that can pull the data and work in a code-block (as it allows me to style the content in Oxygen) ? Thank you in advance



Source

2 Comments
  1. Antoine Lippens says

    This the code I have been using until now :

  2. Antoine Lippens says

    $url = “https://www.dalloz-actualite.fr/actualites/feed.xml”;
    $rss = simplexml_load_file($url);
    if($rss)
    {

    $items = $rss->channel->item;
    foreach($items as $item)
    {
    $title = $item->title;
    $link = $item->link;
    $published_on = $item->pubDate;
    $description = $item->description;

    $count++;
    if($count > 5){
    break;
    }

    hannel->item[$i]->link;
    $description = $xml->channel->item[$i]->description;
    $pubDate = $xml->channel->item[$i]->pubDate;

    $html .= “

    $title

    “;
    $html .= “$description”;
    $html .= “
    $pubDate


    “;
    }

Leave A Reply

Your email address will not be published.