Xander, thanks for all your help with my question. I realize that the code you are suggesting is untested, so I have been experimenting with it the best I can. Here is my updated version of your code:
import arcpy
from arcpy import env
import sys
import os
import datetime
elm_name = "My Dynamic Title"
p = arcpy.mp.ArcGISProject(r"C:\arcGIS_Shared\Python\CenterHeatMaps.aprx")
for lyt in p.listLayouts("Layout_King") [0]:
for elm in lyt.listElements("TEXT_ELEMENT"):
if elm.name==elm_name:
text_elm=elm
break
for m in p.listMaps():
for lyr in m.listLayers("BCBS*"):
new_title=lyr.name
elm.text=new_title
lyt.exportToPDF(r"C:\arcGIS_Shared\Exports" + "\\BCBS" + elm.name[13:] + ".pdf")
print(elm.name[13:])
But when I try and run it it gives me the following error:
Traceback (most recent call last):
File "<string>", line 8, in <module>
TypeError: 'Layout' object is not iterable
Do you know what I'm doing wrong? Also, does it look like I'm at least on the right track?