Title: Custom themes
Last modified: August 22, 2016

---

# Custom themes

 *  Resolved [Odyno](https://wordpress.org/support/users/odyno/)
 * (@odyno)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/custom-themes-8/)
 * Hi,
    I want build a custom presentation of photos, to be precise I would like
   to create a custom presentation of the last photos uploaded. Have you some template
   engine or some legacy method to retrieve only the content information without
   the current html theme? Thanks in advance.
 * [https://wordpress.org/plugins/wp-photo-album-plus/](https://wordpress.org/plugins/wp-photo-album-plus/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Jacob N. Breetvelt](https://wordpress.org/support/users/opajaap/)
 * (@opajaap)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/custom-themes-8/#post-5292993)
 * These php functions are available ( there are more, of course, but i think these
   are usefull for your purpose ):
 *     ```
       wppa_get_youngest_photo_id();
       ```
   
 * returns the id of most recently uploaded photo.
 * If you want, i can add in the next version:
 *     ```
       wppa_get_youngest_photo_ids( $n = '3' );
       ```
   
 * that will return an array sorted by descending timestamp with the youngest n 
   photo ids.
 *     ```
       wppa_get_thumb_url( $id );
       ```
   
 * returns the url to the photo file.
 *     ```
       wppa_get_photo_url( $id );
       ```
   
 * returns the url to the displaysize photo file.
 * If you need more, please ask me.
 *  Thread Starter [Odyno](https://wordpress.org/support/users/odyno/)
 * (@odyno)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/custom-themes-8/#post-5293082)
 * Thanks a lot! 🙂
    I peeked into the code, and I find other functions! I choose
   to build this snippet of code. [https://gist.github.com/Odyno/8b338c7d202125ada3dd](https://gist.github.com/Odyno/8b338c7d202125ada3dd).
 * Simply, I query the database to retrieve the base data, then I start to retrieve
   the information with the common wppa+ functions.
 * So I use
    `wppa_get_thumb_url( $id );` , other function like `wppa_get_album_name()`
   and `wppa_get_thumb_url( $id );` but the last return the url “wp-content/uploads/
   wppa/5.jpg?ver=1”
 * So, I don’t found this 3 feature, can you help me?
    - exist some function usable to retrieve the original src location of photo (
      to embed in to img tag)?
    - exists a function usable to retrieve the “modify” and “delete” link of single
      photo?
    - exist (I think it’s very hard) a function to retrieve if exist a page comment
      of photo?
 * thanks!
 *  Plugin Author [Jacob N. Breetvelt](https://wordpress.org/support/users/opajaap/)
 * (@opajaap)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/custom-themes-8/#post-5293108)
 * **1:**
    wppa_get_lores_url( $id ); // Display size ( optionally resized during
   upload ) wppa_get_hires_url( $id ); // Highes available resulution, orig source
   if save during upload – See table IX-H – else same as above wppa_get_tnres_url(
   $id ); // Effecively the same as wppa_get_thumb_url( $id ); wppa_get_source_pl(
   $id ); // A human readable permalink to the original source file if saved during
   upload, else ”;
 * All the above are suitable for img tag. However note that the permalink requires
   uniqueness of album names and photo names inside the album.
 * **2:**
    Try this code snippet:
 *     ```
       // Edit link
       if ( ! wppa_is_user_blacklisted() ) {
       	if ( ( wppa_user_is( 'administrator' ) ) || ( wppa_get_user() == wppa_get_photo_owner( $id ) && wppa_switch( 'wppa_upload_edit' ) ) ) {
       		$wppa['out'] .= wppa_nltab().'<div class="wppa-thumb-text" style="'.__wcs( 'wppa-thumb-text' ).'" >
       				<a href="javascript:void();" style="color:red;" onclick="'.esc_attr( 'if ( confirm( "'.__a( 'Are you sure you want to remove this photo?' ).'" ) ) wppaAjaxRemovePhoto( '.$wppa['mocc'].', '.$id.', false ); return false;' ).'">
       					'.__a( 'Delete' ).'
       				</a> 
       				<a href="javascript:void();" style="color:green;" onclick="wppaEditPhoto( '.$wppa['mocc'].', '.$id.' ); return false;" >
       					'.__a( 'Edit' ).'
       				</a>
       			</div>';
       	}
       }
       ```
   
 * Change `$wppa['out'] .=` into `echo` and remove any `wppa_nltab()`, and use `'
   1'` for `$wppa['mocc']`
    I did not test this outsie its original context by expect
   no big issues.
 * **3:**
    Look at file wppa-boxes.php, function wppa_comment_html(); section: //
   Loop the comments already there
 *  Thread Starter [Odyno](https://wordpress.org/support/users/odyno/)
 * (@odyno)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/custom-themes-8/#post-5293109)
 * wow!!
 * Thank you again for everything you’ve done.
 *  Plugin Author [Jacob N. Breetvelt](https://wordpress.org/support/users/opajaap/)
 * (@opajaap)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/custom-themes-8/#post-5293113)
 * BTW, This is also what you need to know:
 * `wppa_get_photo_name( $id );` // returns the post-processed name of the photo(
   qTranslate language filtered and stripsleshed etc. )
 * `wppa_get_photo_desc( $id );` // returns the post-processed description ( additionally
   with w# keywords translated etc, see [http://wppa.opajaap.nl/geographic-data/](http://wppa.opajaap.nl/geographic-data/))
 * `wppa_get_photo_item( $id, $item )` // returns the raw data.
 * For available items see: `wppa_create_photo_entry( $args );` in `wppa-wpdb-insert.
   php`

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Custom themes’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-photo-album-plus.svg)
 * [WP Photo Album Plus](https://wordpress.org/plugins/wp-photo-album-plus/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-photo-album-plus/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-photo-album-plus/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-photo-album-plus/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-photo-album-plus/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-photo-album-plus/reviews/)

## Tags

 * [Themes](https://wordpress.org/support/topic-tag/themes/)

 * 5 replies
 * 2 participants
 * Last reply from: [Jacob N. Breetvelt](https://wordpress.org/support/users/opajaap/)
 * Last activity: [11 years, 11 months ago](https://wordpress.org/support/topic/custom-themes-8/#post-5293113)
 * Status: resolved