CiviCRM generates broken link to contribution page
This is the WordPress "base page" setting.  It's at Administer menu » System Settings » CMS Database Integration.

That said - I think the way base pages are working in WordPress is slowly being improved over the last couple of versions.  Please let us know what version of CiviCRM you're running; it may be that this is fixed with an upgrade.