This is what I have.
\documentclass[12pt,a4paper]{article}
\newcounter{theorem}[section]
\newcommand\theorem{\stepcounter{theorem}\framebox{\textbf{Theorem \thesection.\thetheorem}}}
\begin{document}
\section{New Section}
\theorem \label{t1}
\theorem \label{t2}
\ref{t1}
\ref{t2}
\end{document}
It shows :
1 New Section
Theorem 1.1
Theorem 1.2
1
1
I would like it to show this instead :
1 New Section
Theorem 1.1
Theorem 1.2
1.1
1.2
How can I do that? Thanks.
(I'm aware of the \newtheorem command but I don't want my text automatically italicized and I want my text to start on a new paragraph, which is why I went with making my own \theorem command, but now I'm having difficulty referencing the two custom counters that I have, together. I also accidentally made a duplicate account to which I can't login to to delete the duplicate post I made as I'm not sure how to logout from my actual account.)

\refstepcounterrather than\stepcounter. – cfr Jul 17 '18 at 02:461and1in your 'output', so it isn't obvious what should be producing the1.1and1.2you want instead. – cfr Jul 17 '18 at 02:47