WordPress.org

Ready to get started?Download WordPress

Forums

Same pagination Posts + feeds (1 post)

  1. plaszma
    Member
    Posted 1 year ago #

    Hi.
    I'm trying to add some pagination stuff on a couple of posts belongs to my category and others that belongs to an rss feed.
    The code is the following:

    query_posts('cat=27');
    $rss = fetch_feed('......my feed...');
    if (!is_wp_error( $rss ) ) :
    	$maxNr = 15;
    	$maxitems = $rss->get_item_quantity($maxNr);
    	$rss_items = $rss->get_items(0, $maxitems);
    endif;
    if ($maxitems == 0) echo '<li>No items.</li>';
    	 else
           foreach ( $rss_items as $item ) : ?>
    <article class="feed_article"> <?php $content = str_replace("http://www.facebook.com/l.php?u=","",$item->get_description());
    $content = str_replace("%2F","/",$content);
    $content = str_replace("%3A",":",$content);
    preg_match_all('#\bhttps?://[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|/))#', $content, $match);
    foreach($match[0] as $itemvalue ) {
    $newlink = str_replace($itemvalue2,"",$itemvalue);		$content =str_replace($itemvalue,$newlink,$content);
    echo $content;						?>									</article>
    	<?php endforeach; ?>
    if ( have_posts() ) :
    while ( have_posts() ) : the_post();
    //...... design stuff
    endwhile;
    <?php wp_pagenavi(); ?>

    The result is (of course) reading all my articles from Rss specified but without pagination followed by a normal pagination put it to specified posts.How can make a "union" between the posts from RSS and posts from category under same pagination?

    Thanks a lot,

    Iulian,

Topic Closed

This topic has been closed to new replies.

About this Topic