Jonathan Stark
Jonathan Stark

Reputation: 119

How do I customize the preview URL for draft posts in Wordpress?

I've replaced the index.php file in my wordpress root dir with index.html (FYI - for reasons that are out of my control).

Everything works great except the preview URLs for draft posts. This is completely understandable because the .html page rightly does nothing with the query params sent in.

When I manually update the URL to point directly at index.php (which I left untouched in the webroot) the preview shows up just fine.

Is there anywhere in the WP admin where I can force admin links to the preview URLs to point directly at the index.php page?

TIA!

FWIW - I'm an experienced web dev but know next to nothing about WP.

Upvotes: 3

Views: 6717

Answers (1)

Jonathan Stark
Jonathan Stark

Reputation: 119

Thanks to StathisG's comment above, I found my way to the following post which described exactly how to do what I needed:

http://www.cyberciti.biz/faq/php-wordpress-change-post-url-via-preview_post_link-filter/

Thanks!

Upvotes: 0

Related Questions