wordpress shortcode strange behaviour on password protected page

118 Views Asked by At

I've written a wordpress plugin for a friends homepage. It should output a form on a password protected page. I've written this plugin on march 2013. The form is included into the page via shortcode. At that time I printed my output directly via echo. Now my friend told me that the plugin isn't working anymore. I looked at the API docs and found out that I should return the shortcode output so I included my output in an output buffer and returned that content.

The shortcode is embedded in a password protected page. If I am not logged in into wordpress and haven't entered the password, the shortcode content is displayed at the top of the page. If I enter the password, nothing is printed. If I am logged in into wordpress, everythin is fine. Before I enter the password I see nothing, after entering the password I see everything at the right place.

Any ideas?

Best regards, Sebastian

0

There are 0 best solutions below