• Hi,

    Would like to know if your plugin allows for search results to include media gallery photo titles and captions. Does this do this?

    The page I need help with: [log in to see the link]

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Mikko Saari

    (@msaari)

    Yes, Relevanssi can do that.

    Thread Starter connsortia

    (@connsortia)

    Great, will try it.
    Sorry for the next question, but quite new to this.
    What index settings should I check to get Relevanssi to return results that contain gallery photo titles and captions or do I just accept the defaults and run the index?

    Thread Starter connsortia

    (@connsortia)

    I ran the index and it appears to have indexed posts, however, my photos galleries are not in posts, they are on pages, not sure that matters.

    Thread Starter connsortia

    (@connsortia)

    FYI, using Divi by the way as my theme

    Plugin Author Mikko Saari

    (@msaari)

    Relevanssi indexes what you set it to index. Are the photos stored in the Media Library? If they are, then to get Relevanssi to index the photos, you need to make it index the attachment post type.

    If your photos are stored elsewhere, ie. you have a plugin to handle that, then the details depend on which plugin you are using.

    If you don’t want to index the individual images, but instead the gallery pages, then you need to have Relevanssi index pages, and again the exact details depend on how the galleries are done.

    With Divi, you cannot use the Divi search results templates, that doesn’t work with Relevanssi.

    Thread Starter connsortia

    (@connsortia)

    ok, thank you.
    do you have a guide as to how to use in Divi?

    what I am trying to do is allow folks to search a very large photo gallery by instrument serial number, or saxphone type, or engraving type, all within the title, etc.
    Would be nice to be able to put that on top of the gallery pages themseleves but could do a separate page if necessary.

    https://connsortia.com/home/chronnological-gallery/

    Thread Starter connsortia

    (@connsortia)

    ah, i found something in your knowlege base, and it works, tahnks!

    Thread Starter connsortia

    (@connsortia)

    however, it is only showing 5 results, perhaps this is a function in divi?

    Plugin Author Mikko Saari

    (@msaari)

    Yes, the theme would dictate how many posts are displayed. I don’t know enough about Divi to tell if there’s a setting for that.

    If nothing else works, you can use this in your theme functions.php:

    add_filter( 'relevanssi_modify_wp_query', function( $query ) {
        $query->set( 'posts_per_page', 10 );
        return $query;
    } );

    This would make the search show 10 results.

    Thread Starter connsortia

    (@connsortia)

    This is working really nice now!
    Thank you!
    I was reading the help and setup on how to change the results order, but honestly am at a loss. If i wanted the results alphabetical, what would I do?
    BTW, ordering the premium version today so it picks up attachments as well!

    Plugin Author Mikko Saari

    (@msaari)

    You need to add an orderby parameter. This should do it in your theme functions.php:

    add_filter( 'relevanssi_modify_wp_query', 'rlv_alphabetic_order' );
    function rlv_alphabetic_order( $query ) {
        $query->set( 'orderby', array( 'post_title' => 'asc' );
        return $query;
    }
Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘gallery photo titles/captions in search results??’ is closed to new replies.