Title: where to insert code for function
Last modified: August 20, 2016

---

# where to insert code for function

 *  [sle_37](https://wordpress.org/support/users/sle_37/)
 * (@sle_37)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/where-to-insert-code-for-function/)
 * I would like to display a list of my subpages for specific parent pages on my
   site (parentsthatstayhome.com)
 * I also want the list to display the featured image for the page, and the page
   title.
 * I think the code at this link: [http://codex.wordpress.org/Function_Reference/get_pages#Displaying_Child_pages_of_the_current_page_in_post_format](http://codex.wordpress.org/Function_Reference/get_pages#Displaying_Child_pages_of_the_current_page_in_post_format)
   will do what I need, but I really don’t know PHP and don’t know where to insert
   this.
 * I had thought about creating a slideshow, but couldn’t find a plugin that quite
   suited my needs. I could create individual images for the subpages, then create
   a slideshow, but again – didn’t find anything that would really work. Also, eventually
   there will be hundreds of subpages, and creating the images/updating the slideshow
   will get too tedious. I’d much rather it be automated.
 * Any ideas? Please be specific as to where to insert any code and then how to 
   utilize that function on my pages (shortcode or what have you)

Viewing 1 replies (of 1 total)

 *  [colorvila](https://wordpress.org/support/users/colorvila/)
 * (@colorvila)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/where-to-insert-code-for-function/#post-2725175)
 * You should find your page template first, maybe is ‘page.php’or any others, id
   depends on your theme.
    Then add the code in the main loop. If you don’t know
   the php, I think you’d better get someone to help you.
 * If your needs are not very complicated, you can contact me by Gtalk:_[ redacted]_,
   I can do it for you when I have time.

Viewing 1 replies (of 1 total)

The topic ‘where to insert code for function’ is closed to new replies.

## Tags

 * [child pages](https://wordpress.org/support/topic-tag/child-pages/)
 * [php](https://wordpress.org/support/topic-tag/php/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [colorvila](https://wordpress.org/support/users/colorvila/)
 * Last activity: [13 years, 11 months ago](https://wordpress.org/support/topic/where-to-insert-code-for-function/#post-2725175)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
