How to display a sidebar only for blog?

First: is_page() expects a page id, so the call would be is_page(35).

Second: get_sidebar needs to be called from the template (not the functions file).

You probably already have two templates setup:

  • page.php – In here you’ll call get_sidebar('primary');

  • index.php (assuming your blog is on the home page) – In here you’ll call get_sidebar('secondary');

Please let me know if this answers your questions!