Learn to reward/encourage appropriate behaviors regularly and ignore or redirect the attention seeking ones. They do what works for them, bottom line. Once we understand what they want and their strategies for getting it, we can modify our own behaviors and responses to teach our dogs the acceptable way to get what he wants.
Remember, practice makes perfect! Follow the NILIF program (Nothing in Life is Free) and keep at it through the inevidable extinction burst. If you stay consistent, your dog will too; for better or worse.