Go to menu, rightmost tab and select to allow aperture ring. And look for one of the tutorials on how to meter and take photos with manual lenses, there are two or three good ones.
Just switch to M mode, turn off auto ISO, and use green button to meter when the light changes. Use focus peaking to help you with focusing, or learn zone focusing, or focus trapping (aka Catch in focus, CiF)
Good luck! Its not as hard as it sounds, just start doing it!
Edit: like this thread:
https://www.pentaxforums.com/forums/pentax-lens-articles/110657-how-use-meter...k-x-k-7-a.html