• 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)
  • 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

    (@meravjon)

    Hi Mnaka
    I’m need to add:
    <?php if ( function_exists( 'ngg_images_results' ) ) ngg_images_results(); ?>

    Is that all? What is this added for?

    Thread Starter meravjon

    (@meravjon)

    Hi Menaka
    It was suppused to be added to a serach plugin. No matter now. I used other plugin, thanks anyway.

    Thread Starter meravjon

    (@meravjon)

    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.