The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Importing RSS Full text Manually

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #283408

    Hello Css-Tricks Community,

    I’m helping a Catholic church to developed a website. We want to display the daily readings provided here: in our website as a full text with the titles and in the order that they are posted.
    For now, we are using the next code provided by WPLearningLab in a Youtube video. However, he indicate that the original post came from CSS-tricks.

    Can someone help me to display full-text with this code.

    Here the code:

    get_item_quantity( 7 );

    // Build an array of all the items, starting with element 0 (first element).
    $rss_items = $rss->get_items( 0, $maxitems );


        &lt;?php foreach ( $rss_items as $item ) : 

    echo '

    if ($enclosure = $item->get_enclosure())
    echo ‘get_thumbnail() . ‘” class=”feed-thumb” style=”float:left;width:200px;margin-right:10px;” />’;

    <a href="get_permalink() ); ?>” title=”get_date(‘j F Y | g:i a’) ); ?>” target=”_blank”>
    get_title() ); ?> – get_date(‘F j, Y’) ); ?>

    get_description(), 0, 150); ?>
    <a href="get_permalink() ); ?>” title=”get_title() ); ?>”>Continue Reading
    <?php echo '

    ‘; ?>




    I don’t know what YouTube video you’re referring to, or the CSS Tricks article it was based on (plus the code provided is a bit mangled and looks incomplete) but it sounds like you need to research more about the simpleXML extension in PHP. Once you understand how to use that you’ll be able to manipulate the code to your own needs and display the feed however you want in your web page. I did a basic blog post here which you can refer to to get started but you can Google something like “RSS to web page using PHP simpleXML” for lots more tutorials. Try working through them and see what you come up with.

    Good luck with your project.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘CSS’ is closed to new topics and replies.