As "adjusting counters" is dangerous, I do not recommend doing so.
("adjusting counters" may lead to breaking hyperref-features in subtle ways which have to do with not having ensured uniqueness of anchor names any more.)
Be aware that
your examplec-theorem-environment is not numbered.
\inserttheoremname denotes the name of the environment;
\inserttheoremaddition denotes the optional argument of the environment;
\inserttheoremnumber for numbered theorem-environments denotes the number of the theorem in question, and for unnumbered theorems is always empty.
Let's look in your theorem begin-template at the lines:
\inserttheoremname
\inserttheoremnumber
\ifx\inserttheoremaddition\@empty\else\ (\inserttheoremaddition)\fi%
- with the unnumbered
examplec-theorem-environment, \inserttheoremnumber is always empty.
- with the unnumbered
examplec-theorem-environment, \inserttheoremaddition denotes the environment's optional argument, which is the \ref-command for referencing the label of the environment that is to be continued, provided without the (ctd)-phrase.
Thus these lines should be something like:
\inserttheoremname~%
\ifx\inserttheoremnumber\@empty
\inserttheoremaddition~(ctd)%
\else
\inserttheoremnumber~\inserttheoremaddition
\fi
Caveat with this approach:
If you provide \ref{myexample} as optional argument to the examplec-environment, \inserttheoremaddition will expand to exactly this token-sequence.
The \ref within that token-sequence will yield a hyperlink and your examplec-headline will be of pattern
Example ⟨hyperlink; target:=Example 1; text-phrase:=1⟩(ctd)
I think, the pattern
⟨hyperlink; target:=Example 1; text-phrase:=Example 1 (ctd)⟩
is preferable.
Therefore in the example below I have inserted a bunch of expandable code for checking whether the optional argument is of pattern \ref{<name of label>}.
If so, <name of label> is extracted and the hyperlink is created according to the preferable pattern.
This pattern-checking does also address the requirement of marking references via the \ref-command stated by you in your subsequent question of subject Making reference using \ref{name} rather than directly name.
Another question is:
What behavior do you wish in case of continuing not the example but the continuation thereof? (Continuation of continuation of...)
Currently each continuation takes the number provided via the \ref-command in the optional argument as \@currentlabel and places its own \phantomtarget.
Thus each continuation gets the number of the thing that was continued and its heading will link to the \phantomtarget placed by the thing that was continued.
\documentclass[notheorems]{beamer}
\usepackage{refcount}%
\usetheme{Pittsburgh}
\setbeamertemplate{theorem}[ams style]
\setbeamertemplate{theorems}[numbered]
\makeatletter
%%=============================================================================
%% \UD@firstoftwo, \UD@secondoftwo, \UD@Exchange, \UD@gobbletwo
%%=============================================================================
\newcommand\UD@firstoftwo[2]{#1}%
\newcommand\UD@secondoftwo[2]{#2}%
\newcommand\UD@Exchange[2]{#2#1}%
\newcommand\UD@gobbletwo[2]{}%
%%-----------------------------------------------------------------------------
%% Check whether argument is empty:
%%.............................................................................
%% \UD@CheckWhetherNull{<Argument which is to be checked>}%
%% {<Tokens to be delivered in case that argument
%% which is to be checked is empty>}%
%% {<Tokens to be delivered in case that argument
%% which is to be checked is not empty>}%
%%
%% The gist of this macro comes from Robert R. Schneck's \ifempty-macro:
%% <https://groups.google.com/forum/#!original/comp.text.tex/kuOEIQIrElc/lUg37FmhA74J>
%%
\newcommand\UD@CheckWhetherNull[1]{%
\romannumeral0\expandafter\UD@secondoftwo\string{\expandafter
\UD@secondoftwo\expandafter{\expandafter{\string#1}\expandafter
\UD@secondoftwo\string}\expandafter\UD@firstoftwo\expandafter{\expandafter
\UD@secondoftwo\string}\expandafter\expandafter\UD@firstoftwo{ }{}%
\UD@secondoftwo}{\expandafter\expandafter\UD@firstoftwo{ }{}\UD@firstoftwo}%
}%
%%-----------------------------------------------------------------------------
%% Check whether brace-balanced argument starts with the
%% control word token \ref
%%.............................................................................
%% \UD@CheckWhetherLeadingRef{<Argument which is to be checked>}%
%% {<Tokens to be delivered in case <argument
%% which is to be checked>'s 1st token is
%% the control word token \ref >}%
%% {<Tokens to be delivered in case <argument
%% which is to be checked>'s 1st token is not
%% the control word token \ref >}%
\newcommand\UD@CheckWhetherLeadingRef[1]{%
\romannumeral0\UD@CheckWhetherNull{#1}%
{\expandafter\expandafter\UD@firstoftwo{ }{}\UD@secondoftwo}%
{\expandafter\UD@secondoftwo\string{\UD@CheckWhetherLeadingRefB.#1\ref}{}}%
}%
\newcommand\UD@CheckWhetherLeadingRefB{}%
\long\def\UD@CheckWhetherLeadingRefB#1\ref{%
\expandafter\UD@CheckWhetherNull\expandafter{\UD@secondoftwo#1{}}%
{\UD@Exchange{\UD@firstoftwo}}{\UD@Exchange{\UD@secondoftwo}}%
{\UD@Exchange{ }{\expandafter\expandafter\expandafter\expandafter
\expandafter\expandafter\expandafter}\expandafter\expandafter
\expandafter}\expandafter\UD@secondoftwo\expandafter{\string}%
}%
%%-----------------------------------------------------------------------------
%% Check whether argument's first token is a catcode-1-character
%%.............................................................................
%% \UD@CheckWhetherBrace{<Argument which is to be checked>}%
%% {<Tokens to be delivered in case that argument
%% which is to be checked has leading
%% catcode-1-token>}%
%% {<Tokens to be delivered in case that argument
%% which is to be checked has no leading
%% catcode-1-token>}%
\newcommand\UD@CheckWhetherBrace[1]{%
\romannumeral0\expandafter\UD@secondoftwo\expandafter{\expandafter{%
\string#1.}\expandafter\UD@firstoftwo\expandafter{\expandafter
\UD@secondoftwo\string}\expandafter\expandafter\UD@firstoftwo{ }{}%
\UD@firstoftwo}{\expandafter\expandafter\UD@firstoftwo{ }{}\UD@secondoftwo}%
}%
%%-----------------------------------------------------------------------------
%% Check whether brace-balanced argument is of pattern \ref{}
%%-----------------------------------------------------------------------------
\newcommand\UD@CheckWhetherrefpattern[1]{%
\romannumeral0%
\UD@CheckWhetherLeadingRef{#1}{%
\expandafter\UD@CheckWhetherBrace\expandafter{\UD@gobbletwo{}#1}{%
\expandafter\UD@CheckWhetherNull\expandafter{\UD@gobbletwo#1}{%
\expandafter\expandafter\UD@firstoftwo{ }{}\UD@firstoftwo
}{%
\expandafter\expandafter\UD@firstoftwo{ }{}\UD@secondoftwo
}%
}{%
\expandafter\expandafter\UD@firstoftwo{ }{}\UD@secondoftwo
}%
}{%
\expandafter\expandafter\UD@firstoftwo{ }{}\UD@secondoftwo
}%
}%
%%=============================================================================
\newcounter{phantomtarget}%
\renewcommand*{\thephantomtarget}{phantom.\the\value{phantomtarget}}%
\newcommand*{\phantomtarget}{%
\stepcounter{phantomtarget}%
\hypertarget{\thephantomtarget}{}%
\edef\@currentHref{\thephantomtarget}%
}%
%%=============================================================================
\ifbeamer@countsect
\newtheorem{theorem}{\translate{Theorem}}[section]%
\else
\newtheorem{theorem}{\translate{Theorem}}%
\fi
\theoremstyle{example}
\newtheorem{example}{\translate{Example}}
\setbeamertemplate{theorem begin}{%
\begin{center}%
\begin{minipage}{0.9\textwidth}%
\expandafter\UD@CheckWhetherNull\expandafter{\inserttheoremnumber}{%
\expandafter\UD@CheckWhetherrefpattern\expandafter{\inserttheoremaddition}{%
\edef\@currentlabel{%
\getrefbykeydefault{\expandafter\UD@secondoftwo\inserttheoremaddition}%
{}%
{??}%
}%
\refused{\expandafter\UD@secondoftwo\inserttheoremaddition}%
\phantomtarget%\phantomsection
}{}%
}{}%
\begin{\inserttheoremblockenv}{%
% Your examplec-theorem is not numbered, thus \inserttheoremnumber
% will be empty
\expandafter\UD@CheckWhetherNull\expandafter{\inserttheoremnumber}{%
\expandafter\UD@CheckWhetherrefpattern\expandafter{\inserttheoremaddition}{%
\hyperref[{\expandafter\UD@secondoftwo\inserttheoremaddition}]{%
\inserttheoremname~\ref*{\expandafter\UD@secondoftwo\inserttheoremaddition}~(ctd)%
}%
}{%
\inserttheoremname~\inserttheoremaddition~(ctd)%
}%
}{%
\inserttheoremname~\inserttheoremnumber~\inserttheoremaddition
}%
}%
}%
\setbeamertemplate{theorem end}{%
\end{\inserttheoremblockenv}%
\end{minipage}%
\end{center}%
}%
\makeatother
\addtobeamertemplate{theorem begin}{%
%% Do this in case you wish examples to be of equal color as examples:
%\setbeamercolor{block title}{parent=example text}%
%% Do this in case you wish examples to be of some light green:
\setbeamercolor{block title}{fg=green}%
%%
\setbeamercolor{block body}{bg=gray}%
\setbeamerfont{block title}{size=\small,series=\bfseries}%
}{}
\newtheoremstyle{examplec}
{\topsep} {\topsep}%
{\upshape}% Body font
{}% Indent amount (empty = no indent, \parindent = para indent)
{\bfseries\scshape}% Thm head font
{.}% Punctuation after thm head
{1em}% Space after thm head (\newline = linebreak)
{\thmname{#1} \thmnumber{#2}\thmnote{#3} (ctd)}% Thm head spec
\theoremstyle{examplec}
\newtheorem*{examplec}{\translate{Example}}
\begin{document}
\begin{frame}
\begin{example}
This is the first example.\label{example1}
\end{example}
\begin{example}
This is the second example.\label{example2}
\end{example}
\end{frame}
\begin{frame}
\begin{examplec}[\ref{example1}]
Continuing first example.\label{example1c}
\end{examplec}
\end{frame}
\begin{frame}
\begin{examplec}[\ref{example1c}]
Continuing first example.\label{example1c1}
\end{examplec}
\end{frame}
\end{document}
Page 1:

Page 2:

Page 3:
