Forums Forums Search & Filter Pro HTML doesn’t seem to work when pulling from an excerpt

Tagged: 

Viewing 3 posts - 1 through 3 (of 3 total)
  • Anonymous
    #268563

    Unless I am missing a setting somewhere (I promise I looked first), I can’t seem to get the html from the excerpt to work when it displays in my results page. Is this something I need to adjust in WP itself?

    https://semte-postersymposium.engineering.asu.edu/poster-submissions/ Note the first post shows the tags but doesn’t display the text the way I set it up.

    Trevor
    #268586

    The WordPress the_excerpt function strips HTML from the post content, which may be why (you will see, if you examine the code in the results.php template file that function is used).

    A general note first:

    Our plugin files are located on your server in this location:

    …/wp-content/plugins/search-filter-pro

    There you will find a sub-folder named templates and in that a file named results.php.

    This documentation:

    https://searchandfilter.com/documentation/search-results/using-a-shortcode/#customising-the-results

    tells the user to copy that file to their child theme folder, and place it in to a sub-folder that they should name search-filter

    Note that it is always good practice to use a child theme (this is a WordPress recommendation), as it stops updates of a theme from overwriting or deleting any changes and customizations).

    Similarly, if you fail to make that copy of the result.php template file and make your edits to that, then, when our plugin updates, it will overwrite the results.php file in our plugin templates folder.

    Two suggestions might help.

    First, depending on what you want to show in the post grid/list, you could be using our Divi Extension addon plugin. I wonder if this would help (but you would need to use the Divi Blog module, which may not be suitable for you). You can find it for download (if you are logged in) at the top of this guide page:

    https://searchandfilter.com/documentation/3rd-party/divi/

    Second, you could edit the results.php and find this line:

    <p><br /><?php the_excerpt(); ?></p>

    and replace it with something like:

    <div><?php echo get_the_content(); ?></div>

    Anonymous
    #268700

    Fantastic. Yes, I do have that updated results.php in our files so I will take a look-see. Thanks so much for your response, it is helpful. Take care.

Viewing 3 posts - 1 through 3 (of 3 total)