{"id":5755,"date":"2017-12-18T13:04:40","date_gmt":"2017-12-18T12:04:40","guid":{"rendered":"http:\/\/wppa.nl\/?page_id=5755"},"modified":"2020-01-23T13:44:45","modified_gmt":"2020-01-23T12:44:45","slug":"ultimate-member","status":"publish","type":"page","link":"https:\/\/wppa.nl\/de\/docs-by-subject\/advanced-topics\/ultimate-member\/","title":{"rendered":"Ultimate Member"},"content":{"rendered":"<p>If you have Ultimate Member and you want to display the users photos on his profile page, put this in the profile page template:<\/p>\n<pre>&lt;?php\r\nif ( function_exists( 'um_profile_id' ) ) {\r\n\t$user = get_user_by( 'id', um_profile_id() );\r\n\t$owner = $user->user_login;\r\n\techo apply_filters( 'the_content', '[<b><\/b>wppa type=\"thumbs\" album=\"#upldr,'.$owner.'\"]' );\r\n}\r\n?><\/pre>\n<p>If this does not work, try this:<\/p>\n<pre>&lt;?php\r\nif ( function_exists( 'um_profile_id' ) ) {\r\n\t$user = get_user_by( 'id', um_profile_id() );\r\n\t$owner = $user->user_login;\r\n\techo wppa_insert_shortcode_output( do_shortcode( '[<b><\/b>wppa type=\"thumbs\" album=\"#upldr,' . $owner . '\"]' ) );\r\n}\r\n?><\/pre>\n<p>If you only want to show the photos from sub-albums of a certain album, e.g. the album with name: <strong>Members<\/strong>, change the shortcode into: (note the <code>$<\/code> sign in front of the albumname)<br \/>\n<code>[<b><\/b>wppa type=\"thumbs\" album=\"#upldr,' . $owner . ',$Members\"]<\/code><br \/>\nthis is equivalent to (assuming the album id of the Members album is 23):<br \/>\n<code>[<b><\/b>wppa type=\"thumbs\" album=\"#upldr,' . $owner . ',23\"]<\/code><\/p>\n<p>You can change the shortcode as you like, the trick is the insertion of the username: <code>$owner<\/code>, being the var that holds the username of the profile being watched.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you have Ultimate Member and you want to display the users photos on his profile page, put this in the profile page template: &lt;?php if ( function_exists( 'um_profile_id' ) ) { $user = get_user_by( 'id', um_profile_id() ); $owner = $user->user_login; echo apply_filters( 'the_content', '[wppa type=\"thumbs\" album=\"#upldr,'.$owner.'\"]' ); } ?> If this does not work, <a href='https:\/\/wppa.nl\/de\/docs-by-subject\/advanced-topics\/ultimate-member\/' class='excerpt-more'>[...]<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"parent":5733,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-5755","page","type-page","status-publish","hentry","post-seq-1","post-parity-odd","meta-position-corners","fix"],"_links":{"self":[{"href":"https:\/\/wppa.nl\/de\/wp-json\/wp\/v2\/pages\/5755","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wppa.nl\/de\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/wppa.nl\/de\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/wppa.nl\/de\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/wppa.nl\/de\/wp-json\/wp\/v2\/comments?post=5755"}],"version-history":[{"count":3,"href":"https:\/\/wppa.nl\/de\/wp-json\/wp\/v2\/pages\/5755\/revisions"}],"predecessor-version":[{"id":6318,"href":"https:\/\/wppa.nl\/de\/wp-json\/wp\/v2\/pages\/5755\/revisions\/6318"}],"up":[{"embeddable":true,"href":"https:\/\/wppa.nl\/de\/wp-json\/wp\/v2\/pages\/5733"}],"wp:attachment":[{"href":"https:\/\/wppa.nl\/de\/wp-json\/wp\/v2\/media?parent=5755"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}