2

Is there any action hook for wordpress the_permalink ? For example, whenever the the_permalink function is triggered, I need to write a plugin that will try to edit the URL according to my needs, and then return the edited URL that will be echoed. Thanks in advance...

Muhammad Sohail
  • 598
  • 7
  • 14
  • 3
    I believe this may be what you're looking for: https://codex.wordpress.org/Plugin_API/Filter_Reference/the_permalink – AndyWarren Mar 07 '14 at 17:56
  • @AndyWarren that's what I was search for. Thanks for helping... :-) – Muhammad Sohail Mar 07 '14 at 19:01
  • @AndyWarren can you please help me about another permalink issue here? Link: http://stackoverflow.com/questions/22283030/wordpress-i-removed-parent-slug-from-url-but-wordpress-redirects-and-include-pa – Muhammad Sohail Mar 10 '14 at 17:52

1 Answers1

0

I found the solution and let me post in reply so that other members can get help. the_permalink() wordpress functions is used for this purpose. I used this and solve my problem. Thanks to @AndyWarren.

Here is the function: https://codex.wordpress.org/Plugin_API/Filter_Reference/the_permalink

Muhammad Sohail
  • 598
  • 7
  • 14