I bought a printer that needs to be connected to the network through ethernet cable, unfortunately the ethernet entry is in a completely different part of our office, which would require really long wiring to connect. Is there an adapter I can buy that will allow me to connect the printer to the network via wifi? (the printer has a USB port)
You can find the answer to your question on this same SE:
The device requires a power source and has a USB connector for that purpose. If your printer does not provide power at its USB port, you can use a conventional AC to USB adapter.
I can attest that the device works as advertised, but does not tolerate weak Wifi signals very well.
As stated in other answers, a Wireless Bridge describes exactly what you are looking for.
To provide an alternative solution, I can also recommend a Powerline Adapter. This is a psuedo-wired connection. When you purchase the powerline adapter, it comes with two adapters and two ethernet cables. One adapter is connected to your router then plugged into a wall outlet. The ethernet signal is sent over your building's powerlines to the second adapter which is connected to the printer. You may even connect a networking switch to the adapter to connect multiple devices.
Don't get hung up on adapter.
Just use a basic network router that has wifi. It can be a < $50 solution, and would likely be the most reliable. Any number of rj-45 wired ports would suffice since you only need one. And get one that supports your wifi network if it's n or ac or ax. Otherwise basic 802.11 a/b/g wifi routers with < 8 ports are dirt cheap, you don't need any fancy it's only for a printer. You would just need a 120vac wall outlet to plug the wifi router into for electrical power.
If you search on wifi having up to 52mbps, that will exclude all the expensive fancy wifi you don't need.
$19.55 BELKIN F5D7230-4 Wireless G Router 802.11g