[resolved] nextgen search engine search by tags only (7 posts)

  1. roberthq
    Posted 5 years ago #

    I just got the new nextgen search engine v0.6.0 working and thanks to Alex Rabe, it actually works. Thank you Alex.

    I use nextgen gallery with a shopping cart plug-in, wp-estore, and I have duplicated products spanning into many categories. So when someone does a search with this new tool, it brings up many duplicates. I figure there must be a way to have it only search tags, that way I can add tags to only once instance and get no duplicates. I'm not a php pro, but know code. I've been searching both the "search.php" and "nggSearch.php" and have yet to find a way or a place to make this change. Does anyone know?

    Thanks for Reading

  2. roberthq
    Posted 5 years ago #

    I found the answer though the help of Janet Taylor, her response below. Look in the nggSearch.php file for the following...

    $this->search_result = array_merge( (array) $nggdb->search_for_images( $wp->query_vars['s'] ), (array) nggTags::find_images_for_tags( $wp->query_vars['s'] , ‘ASC’ ));
    (array) $nggdb->search_for_images( $wp->query_vars['s'] ),
    so that the final line reads:
    $this->search_result = array_merge( (array) nggTags::find_images_for_tags( $wp->query_vars['s'] , ‘ASC’ ));

    best of luck, I hope it helps.

  3. Meginoz
    Posted 5 years ago #

    Can someone please tell me where you get this NextGen Search Engine? I've seen quite a few posts about it, but can't find any reference to it either by searching WordPress.org or Google. It sounds like just what I'm looking for. Where is it????

  4. James Huff
    Volunteer Moderator
    Posted 5 years ago #

  5. Meginoz
    Posted 5 years ago #

    I looked at that one, but it sounds like it just lets you search your galleries in the admin screen to find a particular gallery - I'm wanting something that will search on the image tags and display the images that have a particular tag.

  6. Meginoz
    Posted 5 years ago #

    Oh, I think I just found it:
    Had to google on "nggsearch.php" to find it - for some reason Alex seems to have a whole lot of stuff on his site that I never find by going straight to the site, I always just stumble across stuff by googling.

  7. Joanne
    Posted 4 years ago #

    I got it to work too --

    everything but the pagination.

    Does anyone have the pagination working for results that are over the "number of images per page"?

Topic Closed

This topic has been closed to new replies.

About this Topic