I want to transition from Mathematics to Computer Science for a PhD. Will post-baccalaureate studies in Computer Science help me? In order to better understand my questions it is best to provide some context to them.

Background: I completed a B.Sc. degree in pure mathematics several years ago. I kept in contact with my letters of recommenders (their letters are strong), and published in an undergraduate mathematics journal. I want to transition from mathematics to computer science for a PhD program. I delayed my entrance into a PhD program to work in industry. Now I am in a position where I can enter back into school. 

The problem I face is that 1) I lack many of the preliminary courses required by many PhD programs in Computer Science and 2) My GPA is on the low side due to extenuating circumstances during those respective semesters (which relates to my reasons of delaying a PhD to pursue industry work). 

The PhD programs I am interested in are very competitive. I contacted a professor at one of these universities (nationally ranked &amp; well-known) and he said he'd vouch for me whenever I applied and a few of my recommenders know him personally. But according to the school's website individual faculty have little input in admission decisions (as admissions is determined by a group of faculty) and they seem to have a strict set of coursework requirements needed in order to be admitted into their program. Also, my GPA falls outside the range of the "average" admitted students.

So, even though I have strong LoRs, strong research experience and a professor interested in me, I have a low GPA and not nearly enough of the core courses to satisfy their coursework requirements. 

I applied/was accepted to do a post-bac at a well-regarded school. I will be a credit (but non-degree seeking) undergraduate student and can take any range of courses I want (both undergrad + grad).

Question: 

1) Will pursuing a post-bac route help me get into a CS PhD program? My aim here is to complete the core set of requirements, bolster my GPA, and make myself competitive for PhD programs in CS (I don't want to do an MS program). Since I lack basic CS coursework I'll be taking courses in programming, data structures, analysis of algorithms, computer organizations and the like.

2) When will be the best time to apply for PhD programs? I plan to take courses on a part-time basis (since I am working full-time), so a max of 1-2 courses a semester. I was thinking if I applied next Fall then I'd only have two programming courses completed (required sequence), and a data structure course in progress. I still wouldn't have completed analysis of algorithms, etc. courses by that time. Luckily, I already taken all of the program's math requirements with high marks.

3) Is it fine to not satisfy every coursework requirement in the list? It is also recommended to have other courses completed outside of the core, but I am very eager to get the core completed and move into research. Lastly, would a B in any of these courses be a death kneel for my purpose? Some of these courses have a reputation of being extremely difficult.  

Thanks for the help!
What you can do is first complete a masters degree in CS and then transition to a PhD program. Some masters programs do not require a bachelor degree in CS, and you can get your degree in 1~2 years after completing all the necessary courses.

While doing your masters degree, you get to know the professors, learn about their projects and gauge your ability to launch a career in computer science. That's also a great opportunity for you to find out if there could be an advisor-student match that will materialize into a PhD thesis.

If you then manage to get into the PhD program in the same institution, you may be able to transfer the credits and take the preliminary exams right away. Speak to the Graduate Advisor to find out more.

Good luck!