• ak

    (@sublime-oblivion)


    I would much appreciate it if someone could recommend me a plug-in which allows you to integrate a feed from another blog (in my case LiveJournal) into the sidebar of my main WordPress blog, i.e. so that it displays the latest 10 entries in the LJ account, for instance.

    Preferably through the Widgets menu rather than changing sidebar.php

    Thanks for any help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter ak

    (@sublime-oblivion)

    *bump*

    Hello,

    You can do it either via a widget (easier) or via a standard code, that looks like this:

    <li id="updateRSS"><h2><a href="https://update.focused.ru">Обновления</a> (<a href="https://update.focused.ru/feed">RSS</a>)</h2>
    			<?php include_once(ABSPATH . WPINC . '/feed.php'); $rss = fetch_feed('https://update.focused.ru/feed/'); $maxitems = $rss->get_item_quantity(5); $rss_items = $rss->get_items(0, $maxitems); ?>
    			<ul>
    			    <?php if ($maxitems == 0) echo '<li>No items.</li>';
    			        else
    			        foreach ( $rss_items as $item ) : ?>
    			            <li>
    			                     <a href='<?php echo $item->get_permalink(); ?>' title='<?php echo 'Запись от '.$item->get_date('d.m.Y, H:i'); ?>'>
                                                 <?php echo $item->get_title(); ?></a>
                                        </li>
                                    <?php endforeach; ?>
                            </ul>
    			</li>

    Sorry for cyrillic above, this is from my page. I took that code long ago from somewhere here that I was advised, it was before 3.0 and created bugs, when using several blocks of it. Anyway, this is clear to use, example here in the right sidebar.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Integrating LiveJournal feed into WP sidebar’ is closed to new replies.