Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

Reply To: eMember – show excerpt of protected post before protection message

by

Tips and Tricks HQ Support Portal › Forums › WP eMember › WP eMember General Questions › eMember – show excerpt of protected post before protection message › Reply To: eMember – show excerpt of protected post before protection message

August 19, 2013 at 1:06 am #46686
myfrenchentreprise
Member

I found another solution:

In wp_eMember1.php remove the comment in front of the line :

add_filter(‘the_excerpt’,’secure_content’, 11);

Change the line to

add_filter(‘the_excerpt’,’secure_content_excerpt’, 11);

on line 1183 (after the end of the secure_content function) add the following function :

function secure_content_excerpt($content){

global $post;

$raw_excerpt = $post->content;

if ( ” == $text ) {

$text = get_the_content(”);

$text = strip_shortcodes( $text );

$text = str_replace(‘]]>’, ‘]]>’, $text);

$excerpt_length = apply_filters(‘excerpt_length’, 55);

$excerpt_more = apply_filters(‘excerpt_more’, ‘ ‘ . ‘[…]’);

$text = wp_trim_words( $text, $excerpt_length, $excerpt_more );

}

return apply_filters(‘wp_trim_excerpt’, $text, $raw_excerpt);

}

Hope this will help.

(sorry for the english i’m french)

Forum Related

  • Forum Home
  • Forum Search
  • Forum Registration
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2026 | Tips and Tricks HQ