WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. esserius
    Member
    Posted 3 years ago #

    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?

  2. esserius
    Member
    Posted 3 years ago #

    bump

Topic Closed

This topic has been closed to new replies.

About this Topic