[Solved] The files excerpt is not visible in Scientia Theme
-
The one small conflict we detected today with the relatively new Scientia Theme.
This theme is great, but unfortunately it does not show file content excerpts in search results with WPFTS Pro which rather greatly reduces the user experience of the site.
Fortunately, this is quite easy to fix. The reason is that the authors of this theme (Scientia Theme) decided to override the standard excerpt generation function, and it is the standard
the_excerpthook that our plugin intercepts to output clever quotes.Let's create our own function, which will declare itself a little earlier and prevent the theme from creating its own.
Our function is very simple and looks like this
if ( ! function_exists( 'scientia_excerpt' ) ) { function scientia_excerpt( $str, $maxlength, $add = '…' ) { ob_start(); the_excerpt(); return ob_get_clean(); } }This solution has been tested with Scientia Theme v1.0.2.
Of course, you don't need to go into the code now and paste it in. You can just download our add-on, where this code is already there.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login