How to make that google wont follow some of the wordpress pages?

You can do two things:

  1. Create a sitemap.xml excluding the pages you just mentioned.
  2. Create a robots.txt which disallows the Google robot from looking at certain files:

    To exclude all robots from parts of a server:

User-agent: *
Disallow: /product-page/checkout

This is not WordPress specific.

HTH