Just wanted you and anyone else who is interested I figured it out.
I had to incorporate the buttons into the following function:
I think this was because the title links are part of a loop on most of those pages. In order to get the url variable to work correctly I had to be inside of the loop. There may be another way to do this. . .just what I came up with and it seems to work.