Skip to content
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

Not working with custom post type #37

Open
uomopalese opened this issue Aug 7, 2022 · 0 comments
Open

Not working with custom post type #37

uomopalese opened this issue Aug 7, 2022 · 0 comments

Comments

@uomopalese
Copy link

uomopalese commented Aug 7, 2022

Hi, if you have a minute...
I solved some minoor issues with this plugin.
Seems that is not working with custom post type

https://mywebsite.com/post-title/pdf works as espected
https://mywebsite.com/category/category-title/pdf doesn't works

I tried:

 ```
   if( empty( $html ) ) {
        // if all else fails, try the public site url (not localhost)
        //$link = get_the_permalink();
        $link = get_post_permalink;
        $link = $link . (strpos($link, '?') === false ? '?' : '&') . 'pdf-template';
        $html = file_get_contents( $link , false, $context );
   }

but it doesn't work. Any idea?
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant