This site is about free exchange of question and answers.
However, sometimes the person asking a question could clearly benefit from some professional help that would go well beyond writing a answer here. I don't see anything wrong with giving a basic answer, and mentioning that there is a lot more to it and that you're available to consult professionally on this topic. Further communication should then be outside this site, but making initial contact here is legitimate.
This should be done sparingly and politely, preferably after providing at least a basic answer customary to this site. The example you cite is too in your face and obnoxious. I think it's OK to be more direct in a short comment, but being a prick about it, as in the example you cite, is not OK.
In summary:
OK: You need to do X, Y, and Z. However, this is a deep subject that can't be answered reasonably here, and your problem would take some time to properly address. I am available to consult in this area. Contact me off site if you want to discuss this further.
NOT OK: I know the answer, but you're going to have to pay to get it.
By the way, I do EE consulting for a living. I have written over 2800 answers here in 3 ½ years, and offered professional services maybe around three times. It's just not approriate in the vast majority of cases.
Any experienced consultant can verify that telling someone you have the answer and they have to hire you to get it is not how to get a job. The best way to get a job is to provide as much help as possible in the initial (free) consultation. If you can solve the client's problem in a two hour meeting, then there wasn't ever a consulting job there anyway. I've actually had cases where I didn't get the job because I solved the problem up front. That's perfectly fine. The client goes away happy, and you've built some trust. When they have their next real problem, you're going to be the one they call.
Most problems are of course too big to solve in the first meeting, but do your best to dig in and be as effective as possible right up front. Trying to hold something back so that you get paid for it later is professionally irresponsible, and just plain stupid anyway. You're much better off showing the client you're really going to work for them and not take them for a ride, which is the number one fear of most clients, especially unsophisticated one. That's actually a good reason not to take a job. A client that won't trust you is going to be a pain to deal with. No matter what you do, they'll always think you're taking advantage of them, constantly trying to squeeze you on price, regularly second-guess you, and probably say bad things about you to others. Whatever money they might pay you isn't worth it. Consulting requires trust both ways. You have to do your part by being trustworthy, but you also have to know when to walk away if the client isn't ever going to trust you anyway.