Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #3211

    I am trying to create profile page that shows users content and want to include galleries they have created. I want to be able to display all the galleries that a user has created on this page. Is there a way to do this in php in the template file for the page i am creating?


    Try something like this:

    global $wpdb, $user_ID;
    $gallery_ids = $wpdb->get_results($wpdb->prepare("SELECT gid FROM {$wpdb->prefix}flag_gallery WHERE status = 0 AND author = %d ORDER BY gid DESC", $user_ID));
    	echo do_shortcode('[flagallery gid='.implode(",",$gallery_ids).' w=100% h=500 name="Gallery"]');
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘GRAND Flagallery WordPress plugin’ is closed to new topics and replies.
Forum closed. Use forum at Gmedia Support Forum