Captive Portal on Wireless Network

Hello everyone, my name is Alfredo, and I recently started exploring OpenWrt and networking in general. I discovered OpenWrt because I was looking for a way to implement a captive portal, and I would say that with OpenWrt, I’ve managed to do so. I installed OpenNDS and customized a theme and some configurations. However, the one thing I can’t seem to get right is to make the captive portal activate only for devices connected through the open Wi-Fi provided for guests, and not for clients connected via cable to the router.

I tried to create a "guests" interface with the "static address" protocol and assigned the "phy0-ap0" device, which I understand is the wireless network. I then configured the option GatewayInterface 'guests' in the /etc/config/opennds file, but it didn’t work.
Do you have any suggestions for me?