• Resolved steve92

    (@steve92)


    I need to replace this code the_title() with this relevanssi_the_title(). Which file are they in?

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

    (@msaari)

    Depends on your theme, but usually it’s search.php in your theme folder.

    Thread Starter steve92

    (@steve92)

    Yes, I have 2 sites and I use 2 themes: Donoval and WP-portfolio, but I can’t find the the_title() code

    Plugin Author Mikko Saari

    (@msaari)

    I can’t tell where it is, the exact place depends on the theme. If you have access to theme support, ask there.

    Thread Starter steve92

    (@steve92)

    I did a search in the themes with BBEdit, but the the_title() code isn’t there

    Plugin Author Mikko Saari

    (@msaari)

    I could not find any reference to a theme called Donoval. If you mean Donovan, it does use the_title(), and it’s in the /template-parts/content-search.php file.

    In WP-Portfolio, the code is located in /inc/structure/content-extensions.php.

    Thread Starter steve92

    (@steve92)

    Good. in Donovan theme /template-parts/content-search.php file line 16 I put <? php relevanssi_the_title (sprintf (...) and I selected ceckbox in WordPress admin setting relevanssi, then I typed an article title, the search found the article but did not highlight the name.

    Plugin Author Mikko Saari

    (@msaari)

    Actually, the correct file is /template-parts/content-excerpt.php and line needs to be

    printf( '<h2 class="entry-title"><a href="%s" rel="bookmark">%s</a></h2>', esc_url( get_permalink() ), relevanssi_the_title( false ) );

    Thread Starter steve92

    (@steve92)

    Good.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Replace the_title() code’ is closed to new replies.