Sleeping problems

Jordan

My son likes to sleep everywhere except in his crib. I stay home with him and so when he takes naps I'll try to put him down in his crib but he will only sleep for maybe 20 minutes but if I put him down on my bed or in his swing or even just on a pallet on the floor he will sleep for at least an hour usually longer. & At night time he will sleep a little while longer in his crib before waking up but he always does multiple times a night and I have to rock him back to sleep over and over idk what to do I've tried all kinds of things anyone else have problems like this?