effexdon
Forum Replies Created
Viewing 3 replies - 1 through 3 (of 3 total)
-
Forum: Fixing WordPress
In reply to: [NextGen Gallery] user must login to see galleryI found something that worked. Hopefully this statment helps answer the many similar questions I have seen.
<?php if ( $user_ID ) : ?> <!-- First Condition - If Logged In --> <?php else : ?> <!-- Second Condition - If NOT Logged In - which usually leads back to login page--> <?php endif; ?>ENJOY
I got it working in case anyone else ever needs this.
<?php $GalID = get_post_meta($post->ID, "Gallery", true); $showgallery = "[gallery=$GalID]"; $showgallery = apply_filters('the_content', $showgallery ); echo $showgallery; ?>I replaced single quotes with double quotes around the $showgallery variable and it works great.
I’m very new to PHP, but not to programming so i may be butchering the syntax. This is what I’m trying:
<?php $GalID = get_post_meta($post->ID, "Gallery", true); echo $GalID; $showgallery = '[gallery=$GalID]'; $showgallery = apply_filters('the_content', $showgallery ); echo $showgallery; ?>Any ideas or help would be great.
Viewing 3 replies - 1 through 3 (of 3 total)