Advertisements Anuncios

If you maintain more than one blog or a forum, then you can display the RSS feed of your posts or articles from another website on your WordPress blog. Si usted mantiene más de un blog o un foro, entonces usted puede mostrar el feed RSS de tus entradas o artículos de otro sitio web en tu blog de WordPress. This would in turn give more exposure to your posts written else where. Esto a su vez dar más exposición a sus puestos por escrito en otro lugar. Although there might be plugins to do this job, you can do this using just 2 lines of code. Aunque podría haber plugins para hacer este trabajo, puede hacerlo utilizando sólo 2 líneas de código. WordPress has a build in function to get the RSS feed of any website. WordPress tiene una generación en función para obtener el feed RSS de cualquier sitio web.

We used this query to get the RSS feed of our Hemos usado esta consulta para obtener el feed RSS de nuestro Mobile Blog Mobile Blog in the sidebar. en la barra lateral. Here is the code. Aquí está el código.

<?php include_once(ABSPATH . WPINC . '/rss.php'); <? php include_once (ABSPATH. WPINC. / rss.php ');
wp_rss('http://feeds2.feedburner.com/themobileblogin, 5); ?> wp_rss ( 'http://feeds2.feedburner.com/themobileblogin, 5);?>

The first line of code is to call to RSS core file of WordPress and in the second line we specify the feed URL and the number of posts to be displayed using the wp_rss() function. La primera línea de código para llamar al archivo central de la RSS de WordPress y en la segunda línea se especifica la URL del feed y el número de puestos que se muestra utilizando las wp_rss función (). You need to replace the feed URL with the URL you want to display in the sidebar. Es necesario sustituir la URL del feed con la URL que desea mostrar en la barra lateral. You can see the Mobile Blog posts showing up in the sidebar of this blog using this method. Usted puede ver el blog de los puestos móviles que muestra en la barra lateral de este blog usando este método.

Feed from another blog

You can also do some formatting using the <ul> and <li> based on your current theme style. Usted también puede hacer un formato con los <ul> y <li> sobre la base de su estilo de tema actual.

NB: If you are not comfortable adding the code, you might get some plugins to do the job, but it is always advisable to go with lesser number of plugins. Nota: Si usted no se siente cómodo añadir el código, es posible obtener algunos plugins para hacer el trabajo, pero siempre es recomendable ir con menor número de plugins.

Thanks to Gracias a WP Recipes WP Recetas for this tip. para este consejo.


5 Responses to “How to Display Any RSS Feed on Wordpress Blog” 5 Respuestas a "Cómo mostrar cualquier canal RSS de blog en Wordpress"

  1. Also, if your theme supports widgets then you can directly add RSS widget to your blog sidebar Además, si el tema soporta widgets entonces se puede agregar directamente widget RSS para tu barra lateral blog

  2. Yes, Widget supported themes can directly add RSS Widget which intern usages above code and rss.php to retrieve feeds Sí, el apoyo Widget temas directamente puede añadir RSS Widget que los usos interno por encima de código y rss.php para recuperar los canales

  3. [...] How to Display Any RSS Feed on Wordpress Blog [...] [...] Cómo mostrar cualquier canal RSS de blog en Wordpress [...]

  4. Small error in the code. Pequeño error en el código. Second line must be.. Segunda línea debe ser ..
    wp_rss('http://feeds2.feedburner.com/themobileblogin', 5); ?> wp_rss ( 'http://feeds2.feedburner.com/themobileblogin', 5);?>

    The ending ' is missing. El fin es que falta.

  5. Rob says: Rob dice:

    What if you don't want the RSS to go to a sidebar, but the actual main body of your website? ¿Qué pasa si usted no desea que el RSS para ir a una barra lateral, pero el cuerpo principal real de su sitio web? I belong to an organisation that is globla and I'd like its news to appear in th emain body of my spin-off site, not just in a sidebar? Yo pertenezco a una organización que se globla y me gustaría que sus noticias a aparecer en el cuerpo de mi Emain o spin-off de la web, no sólo en una columna lateral?

Leave a Reply Deje una contestación