Site logo

Archived topic

Feature request

4 replies · Started by Anders Nielsen on August 3, 2020

Viewing posts 1–5 of 5

A feature request for location of hooks/elements where you can use a reqex or "URL contains"

Created a video :)

Hi there,

ill pass the request on to Tom but you may be able to use the generate_hook_element_displayPHP filter:

https://docs.generatepress.com/article/generate_hook_element_display/

In the first example it uses a condition to display Element ID: 10 when Tom is the author:

if ( 10 === $element_id && is_author( 'Tom' ) ) {

Instead you could try:

if ( 10 === $element_id && strpos($_SERVER['REQUEST_URI'], 'keyword') !== false) {

Not sure - let me know.

Thanks

I will try it later..

I will mark it at solved and reopen if it's not working.

Just a thought. This could also solve my issue.

Is there a way of make several permalinks for one post/page?

So one post can have 50 diffrent URL?

Not that I know of, unfortunately. However, the method that David suggested should work nicely :)

This archived topic is closed to new replies.