I have a view with a block display. Is there any way to change the block pager page programmatically? Currently i am embedding theview using the views_embed_view and i am passing the url arguments. What i need is to pass also the pager index argument also. Is this possible?

Thanks in advance

1 Answer 1


This is how you can get a view programmatically:

  $view = views_get_view('view_name');
  print $view->render();

The views object has many functions which can be viewed here.

You can set current page for the pager with $view->set_current_page($page);


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.