Title: Add code to index.php
Last modified: September 1, 2016

---

# Add code to index.php

 *  [meravjon](https://wordpress.org/support/users/meravjon/)
 * (@meravjon)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/add-code-to-indexphp-1/)
 * Hi,
    I’m using nextgen gallery, but coundn’t find plugin that search the next
   gen galleries and works good. I want to try adding some code I found. Originally
   needed to be added to search.php, but becuase customizr theme dosn’t have one
   I need to add it to index.php. I’m using child theme. So what is the best way
   to do that?

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

 *  [Menaka S.](https://wordpress.org/support/users/menakas/)
 * (@menakas)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/add-code-to-indexphp-1/#post-7502184)
 * Can you give more info about what the code to be added is, and for what purpose
   so that I can tell you where to put it?
 *  Thread Starter [meravjon](https://wordpress.org/support/users/meravjon/)
 * (@meravjon)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/add-code-to-indexphp-1/#post-7502191)
 * Hi Mnaka
    I’m need to add: `<?php if ( function_exists( 'ngg_images_results' ))
   ngg_images_results(); ?>`
 *  [Menaka S.](https://wordpress.org/support/users/menakas/)
 * (@menakas)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/add-code-to-indexphp-1/#post-7502269)
 * Is that all? What is this added for?
 *  Thread Starter [meravjon](https://wordpress.org/support/users/meravjon/)
 * (@meravjon)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/add-code-to-indexphp-1/#post-7502272)
 * Hi Menaka
    It was suppused to be added to a serach plugin. No matter now. I used
   other plugin, thanks anyway.
 *  Thread Starter [meravjon](https://wordpress.org/support/users/meravjon/)
 * (@meravjon)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/add-code-to-indexphp-1/#post-7502390)
 * Hi Back again
    I’m still having some problems with the plugin I bought, so I’d
   like some help here. I found this post that suggests how to create a search for
   images in NextGen Gallery.
 * > Create a blank PHP file on your local machine called something like “nggSearch2.
   > php” and paste this code into the file.
   >  Using FTP and assuming that you are
   > using the default WordPress plugins directory, create a directory called something
   > like “nggSearch2” in the “/wp-content/plugins/” directory. Place the file, 
   > created previously, into the new directory. Place this <?php if ( function_exists(‘
   > ngg_images_results’ ) ) ngg_images_results(); ?> in your themes “Search.php”
   > file. It is WordPress best practice to make modifications to theme file by 
   > creating a child theme. Log into the WordPress admin panel and activate the
   > newly created plugin called “NextGen 2.0 Search engine” Hopefully, I haven’t
   > missed anything. 🙂
 * I did create the plugin as written above, but can’t find the Search.php file.
   
   So after some ridding i got that customizr theme dosn’t have Search.php and I
   need to add it to index.php. I’m using child theme. So what is the best way to
   do that?

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

The topic ‘Add code to index.php’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/customizr/4.4.24/screenshot.png)
 * Customizr
 * [Support Threads](https://wordpress.org/support/theme/customizr/)
 * [Active Topics](https://wordpress.org/support/theme/customizr/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/customizr/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/customizr/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [meravjon](https://wordpress.org/support/users/meravjon/)
 * Last activity: [9 years, 9 months ago](https://wordpress.org/support/topic/add-code-to-indexphp-1/#post-7502390)
 * Status: not resolved