Skip to content

Instantly share code, notes, and snippets.

@karlosgliberal
Created September 15, 2010 08:13
Show Gist options
  • Save karlosgliberal/580404 to your computer and use it in GitHub Desktop.
Save karlosgliberal/580404 to your computer and use it in GitHub Desktop.
<?php
$myview = views_get_view( 'og_canales' ); ///< Your views ID or name here
$display = 'feed'; ///< Your feed name here, string used 2 times
$myview ->set_display( $display );
$args = array(arg(1), 'feed'); ///< You can provide view by some arguments
$myview ->set_arguments($args);
$url = $myview ->get_url();
$title = $myview ->display[ $display ]->display_options[ 'title' ];
print theme( 'feed_icon', check_url( url($url) ), $title );
?>
<link rel="alternate" type="application/rss+xml" title="<? print $title ?>" href="/<? print $url ?>" /
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment