Title: Slideshowpro &#038; WordPress
Last modified: August 19, 2016

---

# Slideshowpro & WordPress

 *  Resolved [awx2d](https://wordpress.org/support/users/awx2d/)
 * (@awx2d)
 * [18 years ago](https://wordpress.org/support/topic/slideshowpro-038-wordpress/)
 * Hi I am using the code developed by theundersigned to build the xml doc for a
   number of slideshow pro gallerys, the script is below, I want to pull out a custom
   field from each post to be used as the gallery image, any help or advise on this
   would be greatly appreciated!
 *     ```
       <?php
       require('./wp-config.php');
       header('Content-type: text/xml; charset=utf-8'); 
   
       function ssp_fetch_images($postid, $size) {
           global $wpdb;
           return $wpdb->get_results("SELECT guid, post_title, post_content FROM $wpdb->posts WHERE post_parent = $postid AND post_mime_type = 'image/jpeg'");
       } 
   
       if(isset($_GET['cat'])) {
       $cat = $_GET['cat'];
       $query = "cat=$cat&showposts=1000";
       } else {
       $query = "showposts=1000";
       } ?>
       <gallery>
           <?php $gallery = new WP_Query($query);
           while ($gallery->have_posts()) : $gallery->the_post(); ?>
           <album title="<?php echo htmlspecialchars($post->post_title); ?>" description="<?php echo htmlspecialchars($post->post_content); ?>">
               <?php $images = ssp_fetch_images($post->ID);
               foreach($images as $image) { ?>
               <img src="<?php echo $image->guid; ?>" tn="<?php echo str_replace(".jpg", ".thumbnail.jpg", $image->guid); ?>" title="<?php echo htmlspecialchars($image->post_title); ?>" caption="<?php echo htmlspecialchars($image->post_content); ?>" />
               <?php } ?>
           </album>
           <?php endwhile; ?>
       </gallery>
       ```
   

Viewing 1 replies (of 1 total)

 *  Thread Starter [awx2d](https://wordpress.org/support/users/awx2d/)
 * (@awx2d)
 * [18 years ago](https://wordpress.org/support/topic/slideshowpro-038-wordpress/#post-773513)
 * Just to clarify as no replies seem to be forthcoming .. while the title specifies
   SSP this is more custom scripting for pulling specific information from a post
   in order to make an XML file.
 * I have tried the get_post_meta function but I’m either not configuring it correctly
   or it wont work here, any help would be greatly appreciated

Viewing 1 replies (of 1 total)

The topic ‘Slideshowpro & WordPress’ is closed to new replies.

## Tags

 * [SlideShowPro](https://wordpress.org/support/topic-tag/slideshowpro/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [awx2d](https://wordpress.org/support/users/awx2d/)
 * Last activity: [18 years ago](https://wordpress.org/support/topic/slideshowpro-038-wordpress/#post-773513)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
