WPFTS Pro Main Site WPFTS Community Forum
    • Recent
    • Tags
    • Popular
    • Register
    • Login
    Get WPFTS Pro today with 25% discount!

    [Solved] EduMall theme does not show Smart Excerpts and broken the search results page

    Scheduled Pinned Locked Moved Recipes and Known Solutions
    1 Posts 1 Posters 561 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • EpsilonAdminE Offline
      EpsilonAdmin
      last edited by EpsilonAdmin

      The famous and beautiful EduMall theme for WordPress has a little incompatibility with the WPFTS's Smart Excerpt. The reason for this is simple - the authors of this theme use their own way of shortening article text to generate excerpts and do not offer a workaround method within the code using hooks.

      Well, we'll have to use a tougher method to fix this incompatibility than simply installing an addon (as we do in most other cases).

      So, first of all, we have to switch to the child theme EduMall Child Theme. Technically, we could make fixes in the main theme as well, but in this case any update of the theme would result in the loss of all changes, and we don't need that.

      So, go to the child theme folder, edumall-child, and create a subfolder tree there:

      template-parts/blog/loop/

      Then go to the same folder in the main theme, find files excerpt.php and excerpt-long.php and copy only these two files to the new created folder in the child theme.

      Now we need to "patch" both files.

      Open the first file, excerpt.php, find two calls of the method Edumall_Templates::excerpt and comment it out with parameters, using /* */ operator.

      Then add this line below the "*/":

      the_excerpt();

      Do this in both places in this file.

      When done, move to the second file excerpt-long.php and do exactly the same in it, patch in two places.

      Finally your files should look like this:

      excerpt.php:

      <?php
      /**
       * The template for displaying loop excerpt.
       *
       * @link    https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
       *
       * @package Edumall
       * @since   1.0
       */
      
      defined( 'ABSPATH' ) || exit;
      
      $post_title = get_the_title();
      ?>
      <div class="post-excerpt">
      	<?php if ( empty( $post_title ) ) : ?>
      		<a href="<?php the_permalink(); ?>">
      			<?php /*Edumall_Templates::excerpt( array(
      				'limit' => 11,
      				'type'  => 'word',
      			) );*/ 
      			the_excerpt(); ?>
      		</a>
      	<?php else: ?>
      		<?php /*Edumall_Templates::excerpt( array(
      			'limit' => 11,
      			'type'  => 'word',
      		) );*/ 
      		the_excerpt();	?>
      	<?php endif; ?>
      </div>
      

      and excerpt-long.php:

      <?php
      /**
       * The template for displaying loop excerpt.
       *
       * @link    https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
       *
       * @package Edumall
       * @since   1.0
       */
      
      defined( 'ABSPATH' ) || exit;
      
      $post_title = get_the_title();
      ?>
      <div class="post-excerpt">
      	<?php if ( empty( $post_title ) ) : ?>
      		<a href="<?php the_permalink(); ?>">
      			<?php /*Edumall_Templates::excerpt( array(
      				'limit' => 42,
      				'type'  => 'word',
      			) );*/
      			the_excerpt(); ?>
      		</a>
      	<?php else: ?>
      		<?php /*Edumall_Templates::excerpt( array(
      			'limit' => 42,
      			'type'  => 'word',
      		) );*/
      		the_excerpt(); ?>
      	<?php endif; ?>
      </div> 
      

      All Done.

      After this, the useful Smart Excerpt of WPFTS should be visible on the Search Results pages.

      If it does not work - please let us know!

      https://e-wm.org

      1 Reply Last reply Reply Quote 0
      • First post
        Last post

      Suggested Topics

      • EpsilonAdminE

        Slow search on a site based on Divi Theme

        Watching Ignoring Scheduled Pinned Locked Moved Recipes and Known Solutions
        1
        0 Votes
        1 Posts
        274 Views
        No one has replied
      • EpsilonAdminE

        [Solved] The files excerpt is not visible in Scientia Theme

        Watching Ignoring Scheduled Pinned Locked Moved Recipes and Known Solutions
        1
        0 Votes
        1 Posts
        476 Views
        No one has replied
      • EpsilonAdminE

        [Solved] Polylang limits search by language taxonomy

        Watching Ignoring Scheduled Pinned Locked Moved Recipes and Known Solutions fix patch polylang search taxonomy
        1
        0 Votes
        1 Posts
        806 Views
        No one has replied
      • EpsilonAdminE

        [Solved] WP Knowledgebase publications (kbe_knowledgebase) do not show in search results

        Watching Ignoring Scheduled Pinned Locked Moved Recipes and Known Solutions knowledgebase kbe
        1
        0 Votes
        1 Posts
        722 Views
        No one has replied
      • EpsilonAdminE

        [Solved] Incompatibility with Flatbase theme

        Watching Ignoring Scheduled Pinned Locked Moved Recipes and Known Solutions flatbase excerpt theme
        1
        0 Votes
        1 Posts
        731 Views
        No one has replied

      Additional Resources

      • My Account
      • Buy WPFTS Pro
      • Community Forum
      • Affiliate Program
      • Privacy Policy
      • Terms & Conditions
      • Contact Us
      • Coupon Partner

      Be the first to read the news!

      We are always improving our products, adding new functions and fixes. Subscribe now to be the first to get the updates and stay informed about our sales! We are not spammy. Seriously.

      Join Us Now!

      We are a professional IT-team. Many of us have been working in a Web IT field for more than 10 years. Our advanced experience of software development has been employed in the creation of the WordPress FullText Search plugin. All solutions implemented into the plugin have been used for 5 or more years in over 60 different web-projects.

      We are looking forward to your comments, requests and suggestions in relation to the current plugin and future updates.

      ewm-logo-450

      The forum powered by NodeBB | Contributors