We have a bunch of world language professors prying at the edges of Pressbooks. One of the requests yesterday was to be able to create a mini-dictionary of target language words at the beginning of sections written in that target language. Mousing over the words would show their English equivalent. The intent is to have ready assistance for those who need it so that writing in the target language can happen earlier in the course. ACF came to mind pretty quickly for this case. I really just needed the ability to generate two values that are paired together- the target language word and the English definition. I need to be able to make as many of these pairs as the person wants to put in there. That’s custom made for the ACF repeater field. Now that I had an easy way for people to add the words, I just needed a way to do the tooltip display. There are 12,000 ways to do this but I just looked around for one that bragged on its accessibility. I found this example on codepen and went with it. This bit of php builds that content. Now that we have the the content and way to handle the tooltip piece, I needed to stick it at the top of the posts. That’s just […]
If you use Advanced Custom Fields you may not realize it removes the ‘Custom Fields’ option from your Screen Options view and hides them entirely in the space they normally occupy below your posts/pages. That’s nice occasionally and a pain other times. Today it was a pain. I figured this out one time before but it took me a while to re-find it at this github page so I’m leaving it here in case I forget again.