Showing content to members only – gallery not working
-
Greetings to fellow WordPress users.
I created a simple shortcode with the following function to hide part of the content in a post/page.
if ( is_user_logged_in() ) return $content;
It works in doing that. The relevant content only shows when I am logged in.
However, the gallery shortcode doesn’t work. It appears as text, for example:
[gallery type="rectangular" ids="14867,14868,14869,14870,14871"]
I tried to place another shortcode within the hidden content, and the same problem appeared.
Anyone know how to make the gallery (or shortcode to run, in general) show up as gallery (instead of the shortcode in text)?
Thanks in advance.
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Showing content to members only – gallery not working’ is closed to new replies.