Advertisements Pubblicità

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. Se si mantiene più di un blog o un forum, quindi è possibile visualizzare il feed RSS dei tuoi post o articoli da un altro sito web sul tuo blog WordPress. This would in turn give more exposure to your posts written else where. Ciò a sua volta, dare maggiore visibilità al tuo post scritti in cui il resto. Although there might be plugins to do this job, you can do this using just 2 lines of code. Anche se ci potrebbero essere dei plugin per fare questo lavoro, si può fare usando solo 2 righe di codice. WordPress has a build in function to get the RSS feed of any website. WordPress è una generazione in funzione per ottenere il feed RSS di qualsiasi sito web.

We used this query to get the RSS feed of our Abbiamo usato questa query per ottenere il feed RSS del nostro Mobile Blog Mobile Blog in the sidebar. nella barra laterale. Here is the code. Ecco il codice.

<?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 prima riga di codice è quello di chiamare a core file RSS di Wordpress e nella seconda riga si specifica l'URL del feed e il numero di posti da visualizzare utilizzando il wp_rss () function. You need to replace the feed URL with the URL you want to display in the sidebar. È necessario sostituire l'URL del feed con l'URL che si desidera visualizzare nella barra laterale. You can see the Mobile Blog posts showing up in the sidebar of this blog using this method. Potete vedere il blog mobile posti che mostra nella barra laterale di questo blog utilizzando questo metodo.

Feed from another blog

You can also do some formatting using the <ul> and <li> based on your current theme style. È anche possibile fare un po 'la formattazione utilizzando il <ul> e <li>, sulla base di stile del tema corrente.

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. NB: Se non sono comode, aggiungendo il codice, si potrebbe ottenere alcuni plugin per fare il lavoro, ma è sempre consigliabile andare con minor numero di plugin.

Thanks to Grazie a WP Recipes WP Ricette for this tip. per questo consiglio.


5 Responses to “How to Display Any RSS Feed on Wordpress Blog” 5 Responses to "Come visualizzare qualsiasi feed RSS su Wordpress blog"

  1. Also, if your theme supports widgets then you can directly add RSS widget to your blog sidebar Inoltre, se il tema supporta i widget, allora potete aggiungere direttamente widget RSS al tuo blog sidebar

  2. Blogsdna BlogsDNA says: ha detto:

    Yes, Widget supported themes can directly add RSS Widget which intern usages above code and rss.php to retrieve feeds Sì, Widget sostenuto temi è possibile aggiungere direttamente RSS Widget che usi interni sopra il codice e rss.php per recuperare i feed

  3. [...] How to Display Any RSS Feed on Wordpress Blog [...] [...] Come visualizzare qualsiasi feed RSS su Wordpress blog [...]

  4. Binny VA Binny VA says: ha detto:

    Small error in the code. Piccolo errore nel codice. Second line must be.. Seconda riga deve essere ..
    wp_rss('http://feeds2.feedburner.com/themobileblogin', 5); ?> wp_rss ( 'http://feeds2.feedburner.com/themobileblogin', 5);?>

    The ending ' is missing. La fine 'is missing.

  5. Rob says: Rob ha detto:

    What if you don't want the RSS to go to a sidebar, but the actual main body of your website? Che cosa succede se non si desidera che il RSS per andare a una barra laterale, ma il corpo reale principale del tuo sito 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? Io appartengo a una organizzazione che è globla e vorrei sue notizie a comparire nel corpo Emain parola del mio spin-off del sito, non solo in una barra laterale?

Leave a Reply Lasci una risposta