Site logo

Archived topic

set element be displayed with regex

3 replies · Started by johnaps on April 10, 2022

Viewing posts 1–4 of 4

Hello!

Can you help me set an element i have set everywhere the url has /νοσοκομειακα-κρεβατια/ in it? With regex?

Hi Johnaps,

This is possible through the generate_layout_element_display Filter Hook.

See: https://docs.generatepress.com/article/generate_layout_element_display/

Getting the Element id: https://share.getcloudapp.com/v1ugOQLG

For instance, see David’s response here: https://generatepress.com/forums/topic/elements-block-hook-location-for-specific-url/#post-1669018

Also see: https://www.w3resource.com/php/super-variables/$_SERVER.php#:~:text=%24_SERVER%5B%27REQUEST_URI%27%5D,/html/html%2Dtutorials.

Hope this helps! Feel free to reach out if further assistance is needed. :)

Thank you very much! :)

You’re welcome Johnaps! Glad to be of assistance! Feel free to reach out anytime you’ll need assistance with anything else. :)

This archived topic is closed to new replies.