Print a custom View anywhere on a page

This snippet will add a custom view to your page where you placed the code. It has several arguments to control.

Snippet:

<?php
//in your page.tpl:

$view = views_get_view('your_views_name');
$limit = 12;
$use_pager = true;
#$args is an array of arguments to pass in
#$use_pager default FALSE
#$limit - the number of nodes int, default 0
#$page - int, default 0
$block = views_build_view('block', $view, $args, $use_pager, $limit, $page);
print
$block;
?>