Skip to main contentSkip to footer

The Photo Gallery plugin from 10Web uses a shortcode to add photo galleries to posts and pages. By default, Relevanssi doesn’t index the gallery contents. Photo Galler only registers the shortcode in the front end, so when Relevanssi indexes pages in the admin context, Relevanssi only sees the shortcode, not the gallery contents.

To fix this problem, add this snippet to your site:

add_filter( 'relevanssi_post_content', function( $content ) {
    $bwg = BWG();
    add_shortcode( 'Best_Wordpress_Gallery', array( $bwg, 'shortcode' ) );
    return $content;
} );

This snippet activates the Best_Wordpress_Gallery shortcode when Relevanssi indexes post content. Now Relevanssi can see the gallery contents.

Your account

Not logged in. Log in to see your license details.

Search

Popular Resources

WP Download Manager

…these issues. When you upload the files to the Relevanssi attachment reading server, Relevanssi uses the get_attached_file() function to get the file name, but that does not work with WP Download Manager. Thus we need to use the relevanssi_get_attached_file filter hook to provide the file name and path for Relevanssi….…add-on adds an advanced search with the [wpdb_archive_filter] shortcode. That search does not use Relevanssi by default, but it can be modified to make use of Relevanssi with this little function you can add to your site: add_filter( ‘wpdm_packages_query_params’, ‘rlv_use_relevanssi’ ); function rlv_use_relevanssi( $params ) { if ( isset( $params[‘s’]…

Related Posts:

Comment Section:

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.
You need to agree with the terms to proceed