Just My Note, Get Post from RSS in WordPress

		<!-- Begin -->
		<?php
		include_once(ABSPATH.WPINC.'/rss.php'); // path to include script
		$feed = fetch_rss('http://yourfeed.com'); // specify feed url
		$items = array_slice($feed->items, 0, 6); // specify first and last item
		?>
		<?php if (!empty($items)) : ?>
						
				<ul>			                
					<?php $hitung = 0; foreach ($items as $item): $hitung++;?>
					<li><a class="judulhome" href="<?php echo $item['link']; ?>" rel="bookmark"><?php echo $item['title']; ?></a></li>
					<?php endforeach; ?>
				</ul>
								
		<?php endif; ?>
		<!-- End  -->		

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s