Changing the post preview link
-
I need to change the preview link. Right now, it looks like this:
https://web_site.com/?p=2293&preview=trueIt needs to look like this:
https://web_site.com/index.php?p=2293&preview=trueI’m surprised that WordPress has index.php for everything else, but not this. This is important because the actual home page has a .html extension and the site pages point to index.php. So, when I hit the preview link, it just displays the index page with the .html extension.
I’ve looked into adding a hook for preview_post_link, but I don’t know how to do this. With extensive searches on Google, I’ve come short of an answer. I want to do this in a way that’s not a hack and where the changes won’t be overwritten with subsequent updates.
I’ve looked into ways of doing this with .htaccess url rewriting, but after a couple of hours working at it, I can’t figure this one out. Any help would be greatly appreciated. Thanks!
- The topic ‘Changing the post preview link’ is closed to new replies.