Skip Navigation

[Resolved] relevanssi "did you mean" after "no results"

This support ticket is created 3 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 6 replies, has 2 voices.

Last updated by blueS-2 3 years, 10 months ago.

Assisted by: Minesh.

Author
Posts
#2173785
Pesquisou-por-shift2futurre.png

Hello
I need help with the relevanssi "did you mean" in search archive

I've inserted "did you mean" from relevanssi in the search archive when there are no search results by following https://toolset.com/forums/topic/relevanssi-didyoumean-feature/ , creating a shortcode using generatewp and code snippets code feature, and used it in the search archive.
The shortcode works, however the shortcode message always shows above the whole archive output (meaning, above blocks outside the loop, where there is some text), not in the right position.
Tried inserting it in the no results text box, after the [wpml-string context="wpv-views"], inside it after the text and also as a shortcode after the loop, where pagination usually sits. Also tried changing the shortcode priority to 99, but no changes.
You can see in the image what I mean.

The shortcode is:

// Add Shortcode
function custom_didumean() {

if ( function_exists( 'relevanssi_didyoumean' ) ) {
relevanssi_didyoumean(
get_search_query( false ),
'<p>Experimente procurar por: ',
'</p>',
5
);
}

}
add_shortcode( 'didumean', 'custom_didumean' );

--------------
priority is set to 99

I've previously shared a site admin credentials with toolset support, they are still active.

thanks in advance
Alex

#2173919

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Do you mean that the did you mean shortcode works just fine and you just wanted to place the shortcode at other desired place?

If this is correct, can you please share problem URL and admin access details.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2173991

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Unfortunately - the admin access details you shared is not working at this end.

Can you please send me working admin access details.

I have set the next reply to private which means only you and I have access to it.

#2174957

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I checked the archive you created: hidden link

But I do not see the [didumean] shortcode, Can you please tell me where exactly you added/placed the [didumean] shortcode?

#2175185
Edit-WordPress-Archives-Block.png

Hello
the shortcode is in the loop template, but i've already tried in a shortcode block below the loop output, no difference in position on rendered page

#2175835

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I think I got here whats going on.

The "did you mean" feature will be in action when archive does not find any result and the only place where you can add something to display when archive do not find any results is at "Loop Template" section for which you shared the screenshot.

It seems its not possible to add the did you mean outside that scope. You can check with Relevanssi if they have any other workaround to offer.

#2180839

My issue is resolved now. Thank you!
I used the shortcode I had previously created and the "elements" feature from kadence pro to inject is exactly where I wanted.

Regards