- This topic is empty.
February 22, 2019 at 10:13 am #283408fquinones22Participant
Hello Css-Tricks Community,
I’m helping a Catholic church to developed a website. We want to display the daily readings provided here: http://www.usccb.org/bible/readings/rss/daily.xml 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 );
<ul><li></li></ul> <?php foreach ( $rss_items as $item ) :
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 '
Felix.February 22, 2019 at 11:42 am #283416BeverleyhParticipant
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 http://blog.fofwebdesign.co.uk/25-xml-to-html-getting-xml-data-into-a-web-page-with-simplexml 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.
- The forum ‘CSS’ is closed to new topics and replies.