Sorry, I think I have to be blunter than the other answers.
Unless there are extenuating personal circumstances that have led to your poor performance, a C or D in one core graduate course combined with a C in another core graduate course (even if you will retake the course, presumably with a better grade) should make you seriously question your goal of getting a PhD. Keep in mind many lower-ranked programs admit students in part so that they can have cheap labor to teach classes, while hoping rather than expecting that the student will be able to earn a PhD and get a job using their degree afterwards. This means you could easily be admitted to some programs without necessarily having a high expectation of success.
Most PhD programs in (pure) math will require you to take comprehensive exams in analysis and in algebra. Generally speaking, the problems on these exams will be like the most difficult problems in the final exams for your courses, although you will not be expected to solve all of them to pass. Unless your current professors are exceptionally tough graders, or you have something else going on that indicates your performance this year is not indicative of your mathematical abilities, or you have some sudden gain of insight that significantly improves your ability to solve math problems, you will likely have great difficulty passing these exams.
Moreover, while there are quite a few exceptions, generally speaking, your ability to learn graduate level mathematics is correlated with your ability to do research. Therefore, difficulties with your courses suggests that you are likely (but not certain) to have difficulties writing a dissertation. (Since you might be doing a research project next year, you might have more information about this then, so I wouldn't give up yet, but keep this in mind.)
Finally, the job market in pure mathematics is quite dismal and likely to remain so for the foreseeable future. Someone graduating with an average or mediocre dissertation will not get a postdoc. If you are a good teacher (and you presumably have some idea by now of whether you could become one or not), you can get a teaching-oriented position, but you can (in reality, not just theory) get most community college positions and many lecturer positions with a Masters degree. There are almost zero industry positions that you can get with a PhD in pure math that you could not have gotten with a Bachelor's degree (and an undergraduate record that can get you into graduate school).