WordPress.org

Support

Support » Plugins and Hacks » Hacks » Search by gallery title and display by gallery? (NextGen Gallery)

Search by gallery title and display by gallery? (NextGen Gallery)

  • Hi there. I want to make my galleries searchable by the gallery title. Essentially, what I want to do is create a search form which will query the DB and do something like this:

    SELECT title
    FROM   wp_ngg_gallery
    WHERE  MATCH (title) AGAINST ('*$keywords*' IN BOOLEAN MODE)
    AND exclude = '0'
    UNION
    SELECT title
    FROM wp_ngg_gallery
    WHERE title = gid
    MATCH (name) AGAINST ('*$keywords*' IN BOOLEAN MODE)
    AND exclude = '0'

    and from this, display galleries with relevant titles using PHP. But um… not a coder. Heh. ^^;

    Now, I THINK that all you need to do is just re-insert whatever gid pops out back into the nggallery shortcode using PHP, but I’m not sure it’s as simple as that (or even how to do that, to be honest).

    Any help?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Search by gallery title and display by gallery? (NextGen Gallery)’ is closed to new replies.
Skip to toolbar