{"id":2530,"date":"2012-11-27T10:52:09","date_gmt":"2012-11-27T09:52:09","guid":{"rendered":"https:\/\/ro.wordpress.org\/support\/topic\/paginare-feed-content\/"},"modified":"2016-08-05T22:29:00","modified_gmt":"2016-08-05T22:29:00","slug":"paginare-feed-content","status":"closed","type":"topic","link":"https:\/\/ro.wordpress.org\/support\/topic\/paginare-feed-content\/","title":{"rendered":"Paginare Feed   content"},"content":{"rendered":"<p>Salut,<\/p>\n<p>Vreau sa pun paginare pe toate posturile dintr-o categorie + excerpturile luate dintr-un rss.Am ceva de genul (scuze de calitatea codului):<\/p>\n<pre><code>query_posts(&#039;cat=27&#039;);\n$rss = fetch_feed(&#039;......my feed...&#039;);\nif (!is_wp_error( $rss ) ) :\n\t$maxNr = 15;\n\t$maxitems = $rss-&gt;get_item_quantity($maxNr);\n\t$rss_items = $rss-&gt;get_items(0, $maxitems);\nendif;\nif ($maxitems == 0) echo &#039;&lt;li&gt;No items.&lt;\/li&gt;&#039;;\n\t else\n       foreach ( $rss_items as $item ) : ?&gt;\n&lt;article class=&quot;feed_article&quot;&gt; &lt;?php $content = str_replace(&quot;http:\/\/www.facebook.com\/l.php?u=&quot;,&quot;&quot;,$item-&gt;get_description());\n$content = str_replace(&quot;%2F&quot;,&quot;\/&quot;,$content);\n$content = str_replace(&quot;%3A&quot;,&quot;:&quot;,$content);\npreg_match_all(&#039;#\\bhttps?:\/\/[^\\s()&lt;&gt;]+(?:\\([\\w\\d]+\\)|([^[:punct:]\\s]|\/))#&#039;, $content, $match);\nforeach($match[0] as $itemvalue ) {\n$newlink = str_replace($itemvalue2,&quot;&quot;,$itemvalue);\t\t$content =str_replace($itemvalue,$newlink,$content);\necho $content;\t\t\t\t\t\t?&gt;\t\t\t\t\t\t\t\t\t&lt;\/article&gt;\n\t&lt;?php endforeach; ?&gt;\nif ( have_posts() ) :\nwhile ( have_posts() ) : the_post();\n\/\/...... design stuff\nendwhile;\n&lt;?php wp_pagenavi(); ?&gt;<\/code><\/pre>\n<p>Problema e ca am pe prima pagina toate posturile venite din rss + numarul de posturi setate pe pagina din categoria mea (id=27).Cum sa fac sa scriu tot in acelasi &#8222;query_posts&#8221; si sa pun paginarea pe articole venite din rss + posturile din categoria mea?<\/p>\n<p>Va rog mult&#8230;<\/p>\n<p>Multumesc,<\/p>\n","protected":false},"template":"","class_list":["post-2530","topic","type-topic","status-closed","hentry","topic-tag-category","topic-tag-feed","topic-tag-pagination","topic-tag-posts"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ro.wordpress.org\/support\/wp-json\/wp\/v2\/topic\/2530","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ro.wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/ro.wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/ro.wordpress.org\/support\/wp-json\/wp\/v2\/topic\/2530\/revisions"}],"wp:attachment":[{"href":"https:\/\/ro.wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=2530"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}