Show the WordPress "loop" outside of WordPress

    <? Php if ( function_exists ( 'fetch_feed' ) ) {

    [19659012] include_once ( ABSPATH . WPINC . '/ feed.php' ) ]; //

    $ feed = fetch_feed ( 'http: // ayudawordpress / tag / Beginner / feed ') ; // Feed URL to display

    $ limit = $ feed -> get_item_quantity ( 3 ) ; // Number of entries to display

    $ items = $ feed -> g et_items ( 0 $ limit ) ; // loading the entries found in an array

    }

    if ( $ limit == 0 ) ] echo '

    No feed.

    ' ; // if no feed exists

    else foreach ( $ items as $ item ) : ?>

    [19659084]

  • <a class = "titublog" href = " <? php echo $ item -> get_permalink () ; [19659196]?> "

    title = " <? Php echo $ item -> get_date ( 'j FY @ g: i a' ) ; ?> ">

    <? Php echo $ item -> get_title () ; ?>

Show RSS feed in a WordPress entry

Really, I have never used this, in fact I can not think of what it might be for but I'm sure you'll find it useful.

I mean, through a ] shortcode you can show anywhere in an entry links to posts in an RSS feed .

If you cheer up the trick is to add this code to the file functions.php ] of your theme (as always) or to your function plugin :

// It is imperative that this file exists in order to call the function wp_rss ().

include_once ( ABSPATH . WPINC . '/ rss.php' ) ;

function ver_RSS ( $ atts ) {

extract ( shortcode_atts ( array ] (

"feed" = > 'http: //'

"num" = > '1'

) $ atts ) ) ;

return wp_rss [196590] 07] ( $ feed $ num ) ;

}

add_shortcode ( 'rss' 'ver_RSS' ) ;

The variable "num" you decide it with the number of links that will be displayed.

Oh, and if you think of a (reasonable) situation to use this trick, you tell me, I do not get it, today I must be thick.

Google+ Updates in WordPress • WordPress Help

If a few days ago we saw how to show your Google+ profile in WordPress by means of a plugin, this simple code will allow us to show the latest updates of our profile where we want. Just edit your template and insert the code, changing the user ID (in this example mine) for yours, which you will find in the URL of your Google+ profile .

The code is a combination of an already known script, which uses the ability to include updates via RSS and a trick to get a feed of your Google+ updates through the service Plusfeed .

<? Php

include_once ( ABSPATH . WPINC . '/ rss .php ') ;

$ googleplus = fetch_rss ( "http: // plusfeed. appspot.com/112849525913645686409"); // Reemploza 112849525913645686409 by your own Google+ ID

echo [19659013] '<a href="';

echo $googleplus-> items [ 0 ] [ 'link' ] ; echo '">' ; // Here pick up the link, by default (0) collects the last, but you can show the previous (1) or other

echo $ googleplus -> [19659030] items [ 0 ] [ 'summary' ] ; // and here the summary content of the update. If you prefer the title, replace "summary" with "title"

echo '' ;

?>

Show RSS feed wherever you want

We already saw a mode of show an RSS feed on your WordPress site but now there is a new method – for WordPress 2.8 and higher – it does not use the Magpie or Snoopy class , but SimplePie and FeedCache, to retrieve an RSS feed.

You just have to copy this code and put it where you want to show the RSS feed chosen on line 3: