If you connect the printer via USB and got it to print anything, you know it is basically working.
If you want to print via WiFi, you need to tell the printer what IP Address to use, and what the WiFi password is so that it can talk on your Network.
On some printers, you can configure this over the USB connection in advance. On others, you have to use your fingers on its Control Panel (on the front of the Printer chassis).
If you have a WiFi Network that uses 10.11.12.1 as the Router address, a good place to assign for the Printer is above the addresses normally given to computers, but below .254. .200 is usually a good choice if you have not already assigned it. For a 192.168.0.1 Network, 192.168.0.200 is usually available.
Then you have to tell it the network password, so that it can talk on the Network.
Then you should launch Network Utility and try to send it two or more Ping's and see that it answers.
You may find this article helpful:
OS X: Connecting a Wi-Fi printer to your Wi-Fi network
Once it answers, Use Add-a-Printer, but do not use the default Browser. Use IP Browser, and specify its IP address. You also need to know whether it will use Internet Printing Protocol, LinePrinterDaemon (LPD), or hp JetDirect Socket (which is used by more than just hp printers). This information should be in your manual.
If it sees the Printer at the Address you specified, it will make sure the correct Driver is in place for you.