• The theme is calling get_the_excerpt function in Archive pages and does not strip the iframe code text. Please hover on the grid layout at cafoundationfund.org/projects

    The excerpt text tis not being trimmed properly. Perhaps adding a snippet directly to the child-theme functions.php will fix this. Can you help me create a function that will correct this bug?

    To be clear, the get_the_excerpt output which trims and strips tags from the excerpt is not working that properly.

    Perhaps the callback wp_trim_excerpt (inside of this callback the function wp_trim_words)` code could work best in the child-theme functions.php. However, I don’t know how to write this type of snippet.

    If possible, please provide the PHP snippet code to fix this problem.

    By the way, the blog page seems to be doing ok: cafoundationfund.org/news

Viewing 7 replies - 16 through 22 (of 22 total)
  • Thread Starter cafoundationfund

    (@cafoundationfund)

    So far this has been the best option.

    It removes most of the excerpts.

    add_filter(‘tc_grid_display_figcaption_content’, ‘my_grid_content’);
    function my_grid_content(){

    $text = strip_shortcodes( get_the_content(”) );
    $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 sprintf(‘<div class=”tc-g-cont”>%s</div>’,
    $text
    );
    }

    Thread Starter cafoundationfund

    (@cafoundationfund)

    add_action( ‘__post_list_grid’, ‘remove_ideck_socials’);
    function remove_ideck_socials(){
    remove_filter(‘the_content’, ‘idsocial_sharing_on_posts’);
    }

    did not work.

    What do you mean with:
    It removes most of the excerpts.

    $excerpt_length = apply_filters( 'excerpt_length', 55 );
    with that 55 you control the excerpt length.

    Ahhh great, so the_content filter must be applied in order to have an actual content for ignition deck products but this produces the iframe issue.

    about the not working remove_filter ok, so that plugin function is not the one to remove, will look into that plugin code, if there are other references to the_content filter. Dunno if I can really test it, it needs the whole ignitiondeck framework + an ignitiondeck account so..

    Thread Starter cafoundationfund

    (@cafoundationfund)

    If you prefer, I can send you admin credentials. If so, provide your email address.

    Thanks, but as per wp.org forum rules you can provide direct contact here.
    Also a simple admin credentials without having the possibility to look at the plugin code could be not enough.

    Anyway we have a clear view of what is wrong here. I suppose this plugin has a support forum. You can ask there how to unhook the socials printed in the content with code.

    Or .. maybe use a different filter. What happens if you just do this:

    add_filter('tc_grid_display_figcaption_content', 'my_grid_content');
    function my_grid_content(){
    
      $text = apply_filters( 'the_excerpt', get_the_excerpt() );
    
      return  sprintf('<div class="tc-g-cont">%s</div>',
          $text
      );
    }

    Also, what happens, instead, when you use the alternate layout?

    Thanks, but as per wp.org forum rules you CAN’T provide direct contact here.

    ??

    ?? yes rdell, thanks for the correction! ??

Viewing 7 replies - 16 through 22 (of 22 total)
  • The topic ‘Category Grid Pulls iFrame Excerpt’ is closed to new replies.