[Resolved] Feature request

Home Forums Support [Resolved] Feature request

Home Forums Support Feature request

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1385694
    Anders Nielsen

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

    Created a video ๐Ÿ™‚

    #1385716
    David
    Staff
    Customer Support

    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.

    #1385974
    Anders Nielsen

    Thanks

    I will try it later..

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

    #1385982
    Anders Nielsen

    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?

    #1386021
    Tom
    Lead Developer
    Lead Developer

    Not that I know of, unfortunately. However, the method that David suggested should work nicely ๐Ÿ™‚

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.