• Resolved Sirion89

    (@sirion89)


    Hi, first of all thank you for the amazing plugin!

    I’m trying to remove the link (the tag A in HTML) from the post type carousel. Digging into the code i’ve saw that it should all come from wp-content/plugins/gutentor/includes/block-base/class-gutentor-query-elements.php inside e get_title function.

    Unfortunately there is no option in the blocks to disable that and there is no filter in the code to hook into and remove it.

    It would be amazing having the choice if we want the link yes/no.

    Cheers,
    Diego

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor codersantosh

    (@codersantosh)

    Hello @sirion89 ,

    Since all the data of Post Carousel Single Post is added from the Filter hook gutentor_post_module_p6_query_data, I would like to recommend you to try this hook keeping the priority higher than 999. I think preg_replace will be handy to replace/remove the anchor tag of the title.

    Best Regards!

    Thread Starter Sirion89

    (@sirion89)

    Hello,

    Thank you for your response but i feel like that is a very late hook, having one simple hook inside get_title would have been more practical and less invasive. Leave alone the fact that when you hook gutentor_post_module_p6_query_data you have a lot more data to search into.

    In the end we opted for a temporary js-based solution. I’ll look forward for some more robust solution when more hooks gets addeed =)

    Cheers,
    Diego

    Plugin Contributor codersantosh

    (@codersantosh)

    Hello @sirion89 ,

    I think it is a good idea to add a filter before returning value on the get_title method, not only this method but other methods available there like description and feature image, etc. We may add filters on all methods in the coming updates.
    I am wondering about adding a filter on the method get_title would be helpful on your case. I am looking for particular code example if you can provide.

    Best Regards!

    Thread Starter Sirion89

    (@sirion89)

    Hello @codersantosh ,

    which code example would you need? maybe i can provide you with something.

    Cheers,
    Diego

    Plugin Contributor codersantosh

    (@codersantosh)

    @sirion89 for your requirement by WordPress PHP hook

    to remove the link (the tag A in HTML)

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Feature request: hooks for get_title’ is closed to new replies.