-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Preview custom post type error #6
Comments
Have you seen anything related in your error log? Could you please check for that. |
Thanks for your comment! No nothing to see when debugging. What I do see is that the url of the preview link on the admin page |
Hi Nick, Could you please try to comment out the following: add_filter( 'post_link', array( $this, 'parse_permalinks' ), 10, 3 );
add_filter( 'post_type_link', array( $this, 'parse_permalinks' ), 10, 4 ); See if it helps to bring back the preview link, if so then the problem lies in |
Hi @nasyrov , When I comment out the second line: The preview links works fine but off course the permalink is no longer changed by your plugin. |
Hi @NickHeurter, Please try to change } else { // if they're not using the fancy permalink option
$permalink = home_url('?p=' . $post->ID);
} to } Basically, comment out the else statement. |
Hi @nasyrov , After removing the else statement the preview permalink changes to Thanks for your help, but this doesn't seems to work :) |
Hi @NickHeurter, Please try to change else { // if they're not using the fancy permalink option to else { Its work for me... :) Thanks |
Awesome thanks, works great! |
I've installed the plugin and it works fine for published posts. But when I tried to preview a custom post type called 'Projects' which is still in concept then the page gives a 404-error. I can see that the preview url, due to the plugin, changes from
/?post_type=projects&p=429&preview=true
to/?p=429&preview=true
and this causes the error.Is it possible to solve this so also custom post types can be previewed when not published yet? Thanks already for your help!
The text was updated successfully, but these errors were encountered: