Completed

Arrumar quantidade de posts importados via xml do Wordpress para site

Published on the October 01, 2016 in IT & Programming

About this project

Open

Tenho um site e fiz a importação dos últimos artigos vindo do blog em outra url, mas preciso limitar a quantidade exibida para 2 posts, pois atualmente exibe todas postagem do blog.

Código atual


<?php
$curl = curl_init();
curl_setopt_array($curl, Array(
    CURLOPT_URL            => 'http://meusite.br/feed/',
    CURLOPT_USERAGENT      => 'spider',
    CURLOPT_TIMEOUT        => 120,
    CURLOPT_CONNECTTIMEOUT => 30,
    CURLOPT_RETURNTRANSFER => TRUE,
    CURLOPT_ENCODING      => 'UTF-8'
));
$data = curl_exec($curl);
curl_close($curl);
$xml = simplexml_load_string($data, 'SimpleXMLElement', LIBXML_NOCDATA);
//die('<pre>' . Print_r($xml], TRUE) . '</pre>');
?>

Category IT & Programming
Subcategory Web development
What is the scope of the project? Small change or bug
Is this a project or a position? Project
Required availability As needed
Experience in this type of projects Yes (I have managed this kind of project before)
Roles needed Developer, Other
Other roles needed Web designer back end Wordpress ajustar quantidade de artigos exibidos em outra url via XML e PHP

Delivery term: Not specified

Skills needed